Avoid long loads and stalls with material preloading

Hi all :slight_smile:

I just discovered one interresting thing today, and i’d like to share my XP…

I got an app separated into multiple scenes:

  1. a main menu/loader scene
  2. a scene 1
  3. a scene 2
  4. etc…

The app launches on the main menu and offers to load the scene 1

This scene load takes about 10sec on an android samsung J5

The thing is that there are many meshes but above all some 8Kx8K textures in materials that have to be sent to GPU in a row ( causing hiccups ).

Now my lil test was to setup in the main menu scene, some cubes ( drawn in 3D in UI ) with each cube carrying one of the materials i use in the scene 1

Hopefully, unity at scene 1 load seems to detect the needed materials are already loaded in the app and in the GPU and don’t load and send them to GPU again ( big thanks to the devs for this !!! :smile: )

This simply leads to a big gain of time ( in my case on a J5 it’s 4 seconds; eg 40% !!! :hushed: ). Now my scene loads in 6 sec instead of 10. If you are curious of the type of scene you can see it here:

Hope you like the idea ( that i found nowhere in web searches ) and i also hope this ‘feature’ will still exist in future U3D versions :wink:

Happy unitying !

hm. seems nobody has load time problems in unity apps^^