-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use % when dropping unique scene nodes into script #61148
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you just have to replace path
here with "%" + node->get_name()
when it's a unique name.
godot/editor/plugins/script_text_editor.cpp
Line 1571 in 26393cc
String path = sn->get_path_to(node); |
Done. |
This expands uppon godotengine#60708, using `get_node("%NodeName")` for nodes that have a unique scene name to avoid having to change the onready statements when the paths of the nodes change.
Thanks! |
Tested locally. I think this PR is also good to cherrypick to |
Cherry-picked for 3.5. |
This expands upon #60708, using
get_node("%NodeName")
for nodes that have a unique scene name to avoid having to change the onready statements when the paths of the nodes change.Preview: