Closed drflamemontgomery closed 1 year ago
Just figured out that I have to initialize the NodePath by using 'new NodePath()'
for anyone else who is having trouble, this is the fixed code
package;
class TestClass extends godot.Node {
@:export public var test_export(default, default) : godot.variant.NodePath = new godot.variant.NodePath();
public function new() {
super();
}
}
Yes, that's a requirement, otherwise your property is null. You either do it like you did or you do it in the constructor of your class (if you have one)
I've noticed that if you try to export a NodePath it will throw an error when opening the Godot project in Godot.
I have my example code below
When I open the project in Godot I get the message