|Topic was automatically imported from the old Question2Answer platform.
I’m pretty new to Godot so I apologize if this question is newbish. I apparently don’t understand how scenes inside of scenes work, but I’ve watched what tutorials are available and read what I have found and nothing really covers the topic of custom controls very well and is frequently contradictory, and everything I try seems to outright crash Godot - not just my program but the entire thing.
In a simplified example, I’ve just got a control node scene called LabeledTextBox (named class of the same) that is nothing but a Label and a LineEdit, and two exported vars for the properties: Label (for Label.text) and Text (for LineEdit.text). This scene runs fine on its own but ofc it doesn’t do much. I can find and add this scene to my main project and it appears in the editor it is working, but if anything is in the Label or Text fields of this nested control, then Godot will completely crash when the scene is run. Alternatively if I instance the object in code and add it as a child, then as soon as the scene is run Godot again crashes.
I’m clearly doing something very wrong but I don’t know what. The page on Custom GUI Controls appears to be talking about what I’m trying to accomplish, but the information on that page is inadequate, providing no information at all on how one might create such a control through scenes, and what the code would look like. I haven’t found any tutorials discussing the topic more specifically, and those on instancing scenes never deal with control nodes.
Any help is much appreciated, and thanks ahead of time.