rickyxd
rickyxd

Reputation: 247

Unity load scene after splash screen ended?

I have Unity personal so I have to show the splash screen (that is customizable in the latest versions of Unity) but I noted a weird behavior of it.In my older games my first scene show up right after the splash screen ended but now in my project the first scene seems to start loading only after the Unity splash screen ends.In fact after the splash screen a white screen show up until the scene is loaded.I've tried to set the splash screen time to 30 seconds, to give the game enough time to load, but nothing happened, after it, whether it lasts 2 or 30 seconds, the white screen still show up before the first scene and this is quite annoying because my first scene is quite big and it takes up to 10 seconds to load.My question is, is it possible to fade out the Unity splash screen only when the first scene is ready?I hope to have explained myself well and thank you!

Upvotes: 0

Views: 4010

Answers (1)

Basile Perrenoud
Basile Perrenoud

Reputation: 4112

According to the documentation for Unity 2017.1:

The Unity Splash Screen is uniform across all platforms. It displays promptly, displaying while the first Scene loads asynchronously in the background. This is different to your own introductory screens or animations which can take time to appear; this is due to Unity having to load the entire engine and first Scene before displaying them.

So with Unity 2017 you should get the desired behaviour. Since you tagged "Unity5", I think that you might not be using the most recent version. You should try to update to Unity 2017. Other than that there is nothing you can do since your license forces you do keep this splash screen

Edit

Seeing your comment, it seems that your scene is just really long to load. Longer thant the splash screen.

First thing: if this is an empty scene, it should be faster. Maybe your device is just too old. Is it quicker on the Editor on your computer? If it is an empty scene and it is that slow on a modern computer, you should contact Unity support.

If the scene is indeed big and long to load, you have two options:

  • You can try to improve your loading time. Use the profiler in Unity to identify the parts of yor code that are slow. Have a good look at your Start and Awake methods. If something is really long, you can try to load it step by step in a coroutine

  • You can add a first scene that is empty, just containing an image or text saying "loading" and this scene immediately loads your main scene. This won't improve perfs but will let users have a waiting screen instead of a blank one

Upvotes: 0

Related Questions