Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How many scenes count as lot

Discussion in '2D' started by kader1081, May 17, 2022.

  1. kader1081

    kader1081

    Joined:
    Oct 16, 2021
    Posts:
    375
    Hi ı have 27 scenes now in my game there will be about 38 scenes in total does that count big.I mean is it a big project
     
  2. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,503
    Some games only use a single scene whereas others use hundreds. There's no right answer. It's more meaningful to optimize for build size (small download) and memory footprint (scenes help you unload irrelevant stuff).
     
    kader1081 likes this.
  3. kader1081

    kader1081

    Joined:
    Oct 16, 2021
    Posts:
    375
    ı know nothing of optimizing build size and memory footprint. Can you suggest some channel or site that ı can learn.And ı just use
    Code (CSharp):
    1. SceneManager.LoadScene("scene_I_want_to_load")
    to change scenes
     
  4. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,503
    kader1081 likes this.
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,514
    Scene count doesn't matter. That only adds complexity to what you have to understand and keep track of.

    Assets included in your project are what add up to make your app large. There's ten billion different ideas on how to keep your app reasonably sized and fifty billion Youtube videos and websites talking about it so I won't bore you.

    To help you avoid duplicating the same thing over and over again in multiple scenes, additive scene loading is one possible solution:

    https://forum.unity.com/threads/right-way-for-performance-divide-scene.1023673/#post-6630961
    https://forum.unity.com/threads/right-way-for-performance-divide-scene.1023673/#post-6754330

    https://forum.unity.com/threads/problem-with-canvas-ui-prefabs.1039075/#post-6726169

    A multi-scene loader thingy:

    https://pastebin.com/Vecczt5Q

    My typical Scene Loader:

    https://gist.github.com/kurtdekker/862da3bc22ee13aff61a7606ece6fdd3

    Other notes on additive scene loading:

    https://forum.unity.com/threads/removing-duplicates-on-load-scene.956568/#post-6233406

    Timing of scene loading:

    https://forum.unity.com/threads/fun...ject-in-the-second-scene.993141/#post-6449718

    Also, if something exists only in one scene, DO NOT MAKE A PREFAB out of it. It's a waste of time and needlessly splits your work between two files, the prefab and the scene, leading to many possible errors and edge cases.

    Two similar examples of checking if everything is ready to go:

    https://forum.unity.com/threads/daily-events-and-content-changes.1108202/#post-7143713

    https://forum.unity.com/threads/uni...on-before-other-scripts.1153739/#post-7401794