Ategon@programming.devM to Godot@programming.dev · 7 days agoDaily Godot Tip #22: The replace_by function can be used if you need to replace a certain node with another while keeping all children within the sceneprogramming.devexternal-linkmessage-square5fedilinkarrow-up157arrow-down10file-text
arrow-up157arrow-down1external-linkDaily Godot Tip #22: The replace_by function can be used if you need to replace a certain node with another while keeping all children within the sceneprogramming.devAtegon@programming.devM to Godot@programming.dev · 7 days agomessage-square5fedilinkfile-text
If you do this remember to free the old one (or have some way of accessing it) since the engine won’t do it for you
minus-squarepopcar2@programming.devlinkfedilinkarrow-up4·7 days agoNot sure about the context of a game, but I’ve used this to replace some UI nodes when the game switches to portrait mode on mobile. Sometimes it’s just easier to use different containers.
Not sure about the context of a game, but I’ve used this to replace some UI nodes when the game switches to portrait mode on mobile. Sometimes it’s just easier to use different containers.