Game levels scenes and prefabs?

So your game will have multiple levels with low level prefabs but should the entire level be a prefab or saved into it’s own scene.

So multiple scenes per level e.g. UI Scene, Player Scene, Level Scene or Prefabs?

Lets say you have a multi level game with a common player and UI across levels what components should be scene based and what prefab based and what impact will this have on game memory size?

1 Like

Honestly, it really depends on what kind of game you are making and what your team composition is. Also how your ‘game data’ is setup: A battle card game like Hearthstone is going to have a very different Scene/Prefab setup to a open world game like Valheim or a physics mobile game like Angry Birds 2.

The setup I typically see on a level-based game (and we are currently using the same approach on an unannounced project):

  • Scene_Persistent

  • Holds all of your important stuff you likely don’t want to runtime unload when moving between ‘Levels’ like Character HUD, Rendering Camera, Player Character, etc.

  • Game Designer, Developers

  • Scene_LEVELNAME_Geo

  • Holds all the level meshes, etc.

  • Environment Artist

  • Scene_LEVELNAME_Lighting

  • Lights, Skybox, Post Processing, Reflection Probes, Light Probes, etc.

  • Lighting Artist, Tech Artist

  • Scene_LEVELNAME_Mechanics

  • Holds all ‘systems’ that are part of a particular level. For example; an interactive puzzle that has a result like a door opening somewhere.

  • Game Designer, Developers

  • Scene_LEVELNAME_VFX

  • Environment VFX

  • Tech Artists, VFX Artists

We use this as it fits our team structure and focuses (and avoid merge conflicts as much as possible). Each scene contains sub-prefabs for different parts/sections to work individually.

Disclaimer: YMMV when using this. Obviously not every game fits into this structure. :smile:

2 Likes