Hi.
I am trying to hide the standard resolution and input dialog. Actually, yes, just hinding it is easy. But...
I have made an options manager that handles resolution , fullscreen and quality settings and also saves and loads them to / from an XML file. In the Start() function it has:
function Start () {
Application.targetFrameRate = 70;
ResetOptions(); // Load defaults
LoadOptions(); // Load XML file
ApplyOptions(); // Apply the settings
Debug.Log("Loaded Options");
}
And this works almost perfectly until I actually hide the resolution dialog. (Almost because the Unity splash screen loads in the default resolution and the resolution only gets reset afterwards. But nevermind that for now.) Once I set the dialog to hidden in the player settings the game always loads in the default resolution set in the player settings. The functions in Start() still get called Log message shows), but the resolution is not reset. It does work to apply the options again from the options GUI I made, but not anymore on startup.
I have looked in the playerPrefs in the registry to see what happens there. When setting the resolution in the options GUI the correct resolution gets saved to the playerPrefs. But on the next start they get reset to the default resolution again. This behavior does not occur when the resolution dialog is show, even if it's with a "hidden by default" dialog and shift-clicking the .exe. The dialog even shows the correct saved resolution then.
I tried executing the functions in Start() on loading the next scene (main menu), and this works, but only if the first scene is not "empty" (just a script to load the options manager and load the next scene).
tl;dr: When hiding the resolution dialog, the settings in playerPrefs always get reset to the defaults from the player settings.
I think this is basically the same as here link here (top related question) which did not get answered for quite some time. I'm at a loss here. This looks like a bug, but usually when I think it is a bug I am just overlooking something. ;)