0 votes

I'm hoping to find a way to set a node (and all of it's childrens') script variables via the inspector, but the inspector only shows variables from the currently selected node. Is there a way to expose the variables from the children in the parent, or would I be better off instantiating the child scenes and setting their variables in _onready()?

in Engine by (12 points)

1 Answer

+2 votes

You can use:
getparent().getnode("NodeName).VariableName
and then set an export variable's value to the Variable_Name.

I'm not sure that is the answer to the question you were asking, but I think it should help.

by (450 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.