|Topic was automatically imported from the old Question2Answer platform.
Coming from Qt, in QML there is this cool feature where you can create an alias to a child’s property to expose it as a property from the parent.
How can you do this in GDscript?
I tried to export a var with setget so I could update the child property in a set function but this is not working properly, well it’s working in the editor but not at runtime where the value is not updated.
Just to be sure, you don’t mean export as the godot script keyword export?
Also I’m not familair with Qt, so what do you mean with:
create an alias to a child’s property to expose it as a property from the parent.
Could you describe it in a generic way?
coffeeDragon | 2018-04-04 11:19
Yes I do mean export keyword in GDScript.
My case in simple. I created a scene for a custom button, with the following structure:
TextureButton (root): button background
Label (child): button text
What I want to do is to expose the Label’s text property so other scenes using the custom button can change the text easily.
BraindeadBZH | 2018-04-04 11:35