Do i need scenes ?

Because i want to create project with many scenes, where i can easily separate and manage my levels like an ogre dungeon, dragon dungeon or butterfly dungeon, I was looking at some stuff about scenes. LoadLevel, LoadLevelAdditive Async etc… I thougt that scene is more like an entity with some “cool stuf behind”. What i found, was that loading scenes is nothing more, than destroing objects and creating others. So my idea is, that it is better for me, to not use scenes and just create one big wrapper object and from that one big multi-prefab for every game level, which i can easily load and unload, edit, move somewhere even in runtime. So here is my question. Is there anything important about scenes, that a cant live without ? Or anything that i cant achieve without using scenes ?

As the others have stated: No you do not specifically need more than one scene. But there are multiple advantages with using scenes which you do not have (out of the box) with just prefabs or procedural content.

Scene specific settings:

  1. Lightmapping: Bake static light into textures to save runtime resources.
  2. Light Probes: Bake light into probes to have objects lit, but not having to use dynamic light.
  3. Occlusion Culling: Calculate Occlusion, so objects hidden behind other objects will not be drawn.
  4. NavMesh: Create a navigation mesh for AI to use for pathfinding.

All of these things can only be created per scene, and not for individual prefabs/Objects. So for example if you create one scene and create a NavMesh for that scene, and you destroy all objects in the scene at runtime and instantiate a whole other prefab to use as the scene, then the original NavMesh for the first scene is still the one being used and NavMeshAgents will not navigate properly.

Scenes can also use ASync loading, which means that they load in the background without freezing the game. Prefabs do not have that option (Altohugh they can use ASync loading through AssetBundles). If you have a prefab which is an entire scene, you will see some lag/freeze when loading it.

Many of these functions are Pro Only though, but there are some alternatives to them on the AssetStore, some of which are not dependent on scenes. So if you want to use scenes or not is very dependent on what type of game you are making and what functionality you need.

Hi,

You can do pretty much everything with just one scene. There’s no absolute reason that you have to have scenes. It can just be easier sometimes to have one level per scene, because it makes loading scenes easier, and code easier to organise and such, but no, it is not necessary to have scenes.

Also as Linus said, this question would be better addressed on the forums :slight_smile:

IEMatrixGuy