Editor works, game build crashes (and possible cause)

Hello,

The problem:

I have been having a weird issue with my game build (standalone for Windows) in which when I first start my game, the Unity logo splash screen is completely white. Then where it usually loads my first “Starting screen” scene, it will crash every time. So, essentially, the splash screen does not run properly (it’s just white) and then the game crashes.

Here’s the interesting part: The Unity editor itself runs perfectly fine – with no issues. I noticed, however, that this issue arose when I disabled the “Display Resolution Dialog” option in my player settings and then built the game.

With this option disabled, I get the white logo screen with no logo animation, and then the crash. With this option enabled, the logo splash screen runs normally, and my game starts with no crash.

Possible cause:

Maybe someone knows exactly why this is the case, but my own theory is that without the “Display Resolution Dialog” being run at startup, the game doesn’t know what or which quality settings to use, and without this information it simply doesn’t know what to do and then crashes? That’s my own guess. Anyways, just wondering if there might be a fix for this issue.

As it stands right now, if I don’t enable the Display Resolution Dialog option in my player settings, the game will crash every time. I am using Unity version 5.1.1p1, on Windows 7 (not Windows 10).

Alright, I think that could be the cause. Have you specified anywhere the resolution of the screen. Take a look here

In one of my scripts I have a function that sets some of the quality settings on the start of the first scene. I tried to run the game with this function setting the resolution, and also without it setting the resolution. Both times, it just crashes.

The problem is that the game never gets to that point (where it can run the code) before it crashes. It seems to crash right in-between where the logo screen would end, and your first scene begins.