1
votes

I am trying to export a NodePath.

Whats the export keyword in Godot-d?

I've tried @export and @Export but still no luck.

2
Did you try export? - sigod
Yes, it doesn't work. - user9383411

2 Answers

1
votes

It's @Property (not to be confused with similarly @property class function attribute). Example : @Property NodePath myNode;

0
votes

I just tested it with the current Godot 3.0 stable and export should work.

Have you tried the following code?

export var testNP = NodePath("AnimatedSprite/StaticBody2D")

If you don't see it immediately just run the script and the Nodepath variable should appear in the editor. You can then edit the Nodepath using the tree hierarchy.

Obviously, your path to the Node is different but it worked for me. Do you get any error messages?