Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | DyFric |
I have a scene (ItemBag) for a widget to reuse often that has a PanelContainer (search_out). The scene tree looks like this:
And in another scene (GUI) I’d like ItemBag instances to behave like a Container:
in the Scene Tree panel each child of ItemBag would end up in the PanelContainer search_out, like Label in the screenshot below.
Ideally the GUI Scene Tree panel would only look like this:
Of course I can enable Editable Children to each ItemBag, but that clutters the Scene Tree panel very much and visually identifying modifications of the instance remains hard.
I am thinking about using @export_node_path(Control)
in ItemBag’ script to move Label in _ready()
but that is not scalable and looks convoluted…
How would you deal with such a situation with re-usability in mind?
success with this approach:
- a proxy Container, parent of ItemBag which handles the layout.
- a proxy Control, child of search_out, for each external child.
A component version is in the works that will leave ItemBag instances free for a custom script.
DyFric | 2023-04-12 16:41