Splash screen only shows on iOS when connected over USB
I have an iOS development build of my game. For some reason, the splash screen with my company logo is not showing; the iOS launch screen appears, but then my first scene (an almost-empty loading screen) appears. However, if I connect the iPhone to Unity over USB and view console output, then the splash screen does appear (after iOS launch image, before first scene). I have no idea why USB would affect anything... See my splash/launch screen settings below. I am using Unity 2020.1.8f1, building with Xcode 12.2.0 in Cloud Build, and testing on an iOS 13.5 device.
I should also mention that my first scene (the loading screen) loads another scene after a couple seconds, using the following script. Could something about the StartCoroutine
in Start
be causing the splash screen not to show?
Thanks in advance for your help!
public class AsyncSceneLoader : MonoBehaviour
{
private WaitForSeconds _waitForSeconds;
private AsyncOperation _loadOperation;
public float WaitForSeconds = 2f;
public string SceneNameToLoad = "bootstrapping";
private IEnumerator Start()
{
if (WaitForSeconds > 0f)
yield return (_waitForSeconds = _waitForSeconds ?? new WaitForSeconds(WaitForSeconds));
StartCoroutine(loadScene());
}
private IEnumerator loadScene()
{
Debug.Log($"Loading scene '{SceneNameToLoad}' in the background...", context: this);
var loadSceneParams = new LoadSceneParameters(LoadSceneMode.Single, LocalPhysicsMode.None);
_loadOperation = SceneManager.LoadSceneAsync(SceneNameToLoad, loadSceneParams);
while (!_loadOperation.isDone)
yield return null;
Debug.Log($"Loading of scene '{SceneNameToLoad}' is complete!", context: this);
}
}