Standalone player in windows open fullscreen, but player settings says windowed

In the late stages of a project I’m working on I found out that if I export a build as a standalone player for windows, the ‘Default is fullscreen’ checkbox in player settings seems not to be respected. If I leave this box unchecked, and create a windows build, and run that build under windows (7), it opens fullscreen anyway. In case it’s relevant, I’m developing on a mac. The mac builds of the project open as expected.

I stumbled on a ‘fix’ of sorts but it’s very unsatisfactory. If I enable the ‘Display Resolution Dialogue’ checkbox, build for windows, then disable ‘Display Resolution Dialogue’ and build for windows again, then the second build will open as expected under windows (windowed, at the specified Default Screen width and height).

Unfortunately I haven’t been able to reproduce this bug in a simple project so far. The one I’m working on has several third party tools (including PlayMaker and NGUI).

Does anyone have an idea about what might be going wrong here?

I stumbled on a ‘fix’ of sorts but it’s very unsatisfactory. If I enable the ‘Display Resolution Dialogue’ checkbox, build for windows, then disable ‘Display Resolution Dialogue’ and build for windows again, then the second build will open as expected under windows (windowed, at the specified Default Screen width and height).

The ‘fix’ you describe suggests that you have run your application on your computer with fullscreen toggled on at some point and then disabled the resolution window. This should not affect end users and the ‘bug’ you’re seeing is just your preferences you’ve previously set, most likely. If you try to run it on a machine where you’ve never run the app on before, or if you change the app name in player settings on your current machine, I would expect you’d be able to run in windowed mode.

So:

  1. Try changing app name temporarily to verify this was the case, and
  2. Try running your app on a machine where you haven’t run the game before

The reason for this is that the resolution dialog writes your settings into the registry. When Unity boots up ready to load your game, it reads those values. Therefore, enabling the dialog to change your settings is valid and as you understand, this is only a ‘fix’ on your own machine. Changing your app name is valid, since it will cause Unity to look for settings in a different registry (which doesn’t exist yet), and will cause the application to behave as if it’s never been run on the machine before.