Search Unity

How to load a scene faster?

Discussion in 'Getting Started' started by RuneShiStorm, Dec 13, 2021.

  1. RuneShiStorm

    RuneShiStorm

    Joined:
    Apr 28, 2017
    Posts:
    264
    Hi all!
    I have a game out on Steam and currently porting it to Switch.
    There is one scene in the game that is HUGE, and I have a couple of questions that can help me
    load it faster. At the moment the Load Scene is not acceptable :p

    1. Can I check somewhere in my project how big the scene is?
    2. WHAT is it, that takes soo long to load usually? Aka, Music, Sprites, Scripts, Animations. Etc.
    3. Is there a way to only load portions of the scene when going in, and "unlocking" other parts of the scene as the player moves around. (See image... imagne that you exit from one of the Dots, and it loads the surrounding areas before it loads the rest of the scene. )
    4. If not possible to load parts of it, what can I do to make it load faster?

    Im a trail-and-error programmer and don't think I'm cunning enough to make the Scene be Saved into the Switch System itself. (If thats even possible)... Travesty in this game is key, thus I don't want to cut it up in smaller scenes... :/

    Thanks in advance!
     

    Attached Files:

    • load.jpg
      load.jpg
      File size:
      165.7 KB
      Views:
      350
    spogebob360 likes this.
  2. kittik

    kittik

    Joined:
    Mar 6, 2015
    Posts:
    565
    You could look into Additive Scenes. If you split off your scene into smaller scenes, loading times would be reduced.

    Unfortunately, if you are at a later stage in the projects development, this is harder to achieve than if a project begins in this manner, it is still possible though. Instead of seeing a scene as an individual level, you can decouple objects which need to persist (audio, instances, managers), while objects which do not need to persist might be environmental, AI characters etc. It can also make it easier to both create scenes, as they are smaller and if you are working in a team, collaborate without any scene conflicts.

    As for other optimisations, there is a lot of information out there, which a search engine can help you find really easily. I suggest using the Debugger if haven't and see which scripts are taking the most memory.

    Best of luck.
     
    RuneShiStorm likes this.
  3. RuneShiStorm

    RuneShiStorm

    Joined:
    Apr 28, 2017
    Posts:
    264
    Thanks for your advice I will look into it!