- Home /
Enabling/Disabling or Instantiating objects between scenes?
I want to programmatically generate levels with rising difficulty. Level scene is ready and working. What would be more efficient in context of generating each new level from code:
- have a scene full of inactive objects and just activate them in order
- or have empty scene and instantiate everything from prefabs
Any feedback would be helpfull :)
Not sure what you mean by more efficient. Option 1 will lead to super messy scenes over time and can be hard to maintain. Option 2 works very well from own experience.
For me generated and scene objects don't go well together. As soon as it's unclear where something needs to be in a scene, instantiate it. Only cullpit: async scene loading works smoothly only with scene objects since instantiate runs from within the scene. So if your scenes are co$$anonymous$$g to be huge preinstantiated objects lead to better user experiences
Your answer
![](https://koobas.hobune.stream/wayback/20220612154156im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Must I attach every script to a gameobject in order to work ? 2 Answers
Most efficient way to remove a null object from a dictionary 3 Answers
A real head-scratcher 0 Answers