Hi! I'm new to Godot and I've been asking myself a question for the past two days about the editor's inspector a script's variables:
Is there a way to use a variable declared on a script inside the editor's inspector?
For example, I would like to replace the static "Label" text with a exported variable named "label_text".
This exported variable belongs to a script attached to the Label's grandparent node:
= PanelContainer (the variable is declared in the script attached to this node)
=== Label (i want to use the variable in here)
Now, why do I want to do this?
First: this nodes are a scene that I saved in order to re-use code. It is a EditLine + Label that I want to use in many different forms. Now, I'm exporting a variable named "label_text" in order to assign the Label's node text while instatiating it.
That whole thing work just fine and I'm able to use this scene on my forms, but there is a small problem. Everytime I use my scene, it looks like this on the editor:
Yes, it displays the default values that I've set on the scene itself. So, if I employ this scene 10 times, there will be 10 elements that look exactly the same on screen. Example:
Is there any solution for my problem? Thanks in advance and sorry for my bad english!