Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Creating a loading bar to load in all textures and sounds before game launches

Discussion in 'Editor & General Support' started by laserDogRob, Sep 27, 2021.

  1. laserDogRob

    laserDogRob

    Joined:
    Jun 20, 2018
    Posts:
    39
    Hey,

    I've googled this, but every result is about creating a loading bar in the UI.

    What I'd like to do is SPLASH >. LOADING SCREEN > MENU > GAME etc

    In the loading screen, I'd like to load all the textures and sounds and keep them in memory so they don't need to be loaded again.

    What's the best way to go about this? It'd be nice to be able to get the percentage loaded too, so if it's a list I can iterate through that'd be great.

    Thanks!
     
  2. laserDogRob

    laserDogRob

    Joined:
    Jun 20, 2018
    Posts:
    39
    (It's a relatively small game where you die and repeat a lot)
     
  3. laserDogRob

    laserDogRob

    Joined:
    Jun 20, 2018
    Posts:
    39
    If I referenced an asset (monobehaviour/scriptable object) in a loading scene (and kept as donotdestroyonload), and that asset has references to all of my sounds and textures, would loading the scene async achieve this?
     
  4. laserDogRob

    laserDogRob

    Joined:
    Jun 20, 2018
    Posts:
    39
    Totally talking to myself here, but the above seems to work fine :)