Loading scene vs. instantiating prefabs - which is more efficient?

Heya,

I’m planning out my next game which will be a 2D mobile game with many levels.
Because of this, I’ve run into the tried-and-true debate of what is the best way to make many levels for a game.

From what I gather there are 3 major ways going about this:

  • Making each level a different scene
  • Making all levels in the same scene and enabling/disabling gameobjects in it to use different levels
  • Store level data in a text file and load it to generate a level on the fly inside the scene

My question is about comparing option 1 to option 3 -
Assuming I have prefabs of everything, a text file with level data and a script for instantiating a level based on that data, would instantiating the level this way be more, less, or about the same CPU-intensive as simply loading a scene with all those objects inside?

I’d love to hear if you have an answer regarding this question, as well as any opinions regarding options 1 to 3.
Thanks!

CPU-wise it’s probably about the same. You are still instantiating the same number of objects. This is more of a developer workflow question.

1 Like

I see. I figured as much - just wanted to make sure. Thank you :slight_smile: