tutorials/scripting/scene_unique_nodes #267
Replies: 1 comment
-
It's interesting that the same-scene behavior is described as a limitation when actually it's a feature. If it wasn't for that functionality, unique nodes in instantiated scenes would be unusable because they wouldn't necessarily be unique, if the scene that instantiated them instantiated multiple nodes. That is, it's a way of guaranteeing uniqueness in a way that makes it a useful feature for all scenes, not just the main one. In the example above, what would happen if we had two Swords, and each one had a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
tutorials/scripting/scene_unique_nodes
Introduction: Using get_node() to reference nodes from a script can sometimes be fragile. If you move a button in a UI scene from one panel to another, the button's node path changes, and if a scri...
https://docs.godotengine.org/en/stable/tutorials/scripting/scene_unique_nodes.html
Beta Was this translation helpful? Give feedback.
All reactions