Replies: 2 comments 2 replies
-
Why do you want to export them? If you're trying to explicitly add a reference to a node that won't break when you move nodes around, assign them unique names if you also want to be able to drag them in. The point of being able to drag them into the script is to give an easy shortcut to add these explicit references that are set in the script, so exported nodes wouldn't make sense in this context. What would the names of the variables be? Would they be assigned? It's also not too hard to transform @onreadys to @export, you can put the caret over one @onready and press Ctrl+D to select all of them with multicarets, then change the annotation. Skip ahead a couple words with Ctrl+right, and delete the content after the assignment. |
Beta Was this translation helpful? Give feedback.
-
Generating the |
Beta Was this translation helpful? Give feedback.
-
Currently, you can drag nodes from the scene tree and hold
Ctrl
before dropping them in the script editor to automatically create@onready
variables.It would be great if this same functionality was to be extended to
@export
too. HoldingAlt
before dropping should create@export
variables in the exact same way, and should automatically assign the nodes to the respective variables in the inspector.This enhancement would make
@export
even more convenient to use, helping users avoid string node references without getting in the way.Beta Was this translation helpful? Give feedback.
All reactions