In which cases is it better (performancewise) to hide/ unhide scenes instead of changing the whole scene?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Ciavarie

When you build a world and put houses, caves, etc into it, you could just place that stuff inside the main scene and hide/ unhide it or change the scene completely.
Thinking about it, I guess the size of the new scene, the amount of objects inside it, etc. have a big influence on the decision.
I guess hiding/ unhiding makes more sense on small scenes (for example a house with a npc) and changing the scene is like going to a new level (for example a huge cave system).

But are there general rules of thumb for cases which are not as clear (tiny house vs huge cave)?

:bust_in_silhouette: Reply From: Magso

By ‘hide/unhide scenes’ I’m guessing you mean with the visible property? As long as your scenes are instanced and have reference to a variable the add_child() and remove_child() methods should give you the best performance, especially when working with larger maps.