Is there any method I can use to detect when the Unity splash screen has finished and is no longer on screen? Currently I have some sounds that play on Awake but they play while the Unity splash screen is still present. I would like to be able to tell when the splash screen has ended so I can play my sounds at the appropriate time. Thank you in advance!
Solution for Unity 5.3.2 an higher:
You can check now if an application was loaded with Application.isShowingSplashScreen
(Unity - Scripting API: Application.isShowingSplashScreen)
Once the 1st scene loads, the splash screen is gone. So you can just use the Start method of a script that’s used in your 1st scene.
Method is deprecated. Use UnityEngine.Rendering.SplashScreen.isFinished instead.
(https://docs.unity3d.com/ScriptReference/Rendering.SplashScreen-isFinished.html)
Control it via
Nimdanet gave the correct answer for the newer unity versions. Check Unity - Scripting API: Rendering.SplashScreen.isFinished for more info:
using System.Collections;
using UnityEngine;
using UnityEngine.Rendering;
// This example shows how you could draw the splash screen at the start of a scene. This is a good way to integrate the splash screen with your own or add extras such as Audio.
public class SplashScreenExample : MonoBehaviour
{
IEnumerator Start()
{
Debug.Log("Showing splash screen");
SplashScreen.Begin();
while (!SplashScreen.isFinished)
{
SplashScreen.Draw();
yield return null;
}
Debug.Log("Finished showing splash screen");
}
}