types

Exporting a Variable with Type-Casting

It is common to want to export variables out of the code and into the GUI. When you export variables in Godot, your normal methods of casting may not work. export(Node2D) var gem # doesn't work >:-( Solution-ish(?): You sometimes just can’t. Sorry. Godot only supports certain native types for exporting to the GUI. var player : Node2D var gem : Node2D export var count : Integer # Only native types can be exported Read more »