c# – Unity game extecutable sometimes takes longer to launch, and Unity splash logo doesn’t show

In the exported build of my game (which uses Unity 2020.3.15f2), I notice that sometimes the game’s executable launches immediately, correctly fading in and out the built-in Unity logo on the splash screen (which is set via Project Settings to take 3s).

enter image description here

Other times, however, it takes a few seconds to launch and the built-in Unity logo does not seem to show on the splash screen. (We know that we are nonetheless on the splash screen, however, since I have it colored red for debugging purposes).

enter image description here

Here is some video showing the phenomenon.

There appears to be no pattern to when it boots correctly versus incorrectly (seems to be about 50-50). It makes no difference whether I have the Untity editor running or not in another window.

My hardware specs are good. The executable is only 627 KB. Further, I have made sure I am not doing any performance intensive process on boot. I even scaled back my pooling system from instantiating 10,000 objects on boot to instantiating zero.

I would like the experience of launching my executable to be consistent, always fading the built-in Unity logo in and out.

Does anyone have advice on diagnosing, troubleshooting, or solving this issue?

Read more here: Source link