+3 votes

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)?

in Engine by (57 points)

1 Answer

+2 votes

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.

by (3,257 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.