About improving Scene Unique Nodes #5081
Mickeon
started this conversation in
Engine Core
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Since 3.5 has finally been officially released, users can finally test Scene Unique Nodes, before 4.0 comes out.
In a nutshell, any Node within a Scene can be marked as Unique. One can then use the "%" accessor before a Node's name in a NodePath (eg.
get_node("%Node"
) to always point to the same Node, regardless of where it is in the tree).This is, for example, useful when editing any Scene whose Nodes are prone to be shuffled around the tree, potentially breaking any related code if the paths aren't up to date.
Because of its fresh availability, I thought it'd be a good idea to compile some proposals/pull requests regarding them, to bring light on the issues they plan to resolve, and hear the community's thoughts. I find this to be particularly important, as a few may potentially be compatibility-breaking.
(Most of these entries happen to be mine, as I've taken quite the personal interest for thinking on how to improve this feature. More will be added in the future when I see them):
Proposals
Scripting:
$$
operator/literal #5064Node.get_unique_node()
as a way to get Scene Unique Nodes #5048UI:
Pull Requests
Scripting
%
in shorthand forget_node
(not in 3.x)Beta Was this translation helpful? Give feedback.
All reactions