I have a issue which I noticed in both 4.3.4 and now also in 4.5.0.
The problem is when I am building a exe file.
First it doesn’t matter if the “Default is fullscreen” is ticked or not. I always get either a windowed or fullscreen.
And what I get is kind of predecided by Unity. But I think 99% its been fullscreen.
To get windowed mode, I have to enable the “Display Resolution Dialog” in PlayerSettings, build the exe and run it, tick the windowed option, close the exe, go back and disable the “Display Resolution Dialog”, and then rebuild a exe. But then I only get a windowed window, and I can’t get a fullscreen.
Another issue is that the exe file “remembers” what type of window mode I had the last time it was run.
So if I start the exe in window, but goes to fullscreen, then next time I start the exe (without building a new one in Unity ofcourse) it starts in fullscreen. If I change to windowed, close it and starts it, it starts in windowed mode.
I switch between window/fullscreen by changing the Screen.fullscreen boolean to true/false.
What I want, is to ALWAYS start the exe in window mode, and manually while the exe is running to switch to fullscreen. And when I restart it should start in window mode, and not fullscreen.
Have anyone else noticed this issue? Or is this a feature and not a issue?
I have tried this on three different computers. Two with a pro licence (v. 4.3.4) and one with free (v 4.5.0).
All three computers are Win7 computer.
Thats true, but the best way would be to make it optional to save the settings or something like that.
I just find it little frustrating, when i want to do a build in window mode, i explicit set to window mode through the player settings, but getting a fullscreen because its stored in the registry.
Yes, writing one line fixes that, but still…
I think you missed the issue, Graham. An app remembering previous settings is a feature, going against the user or programmer’s explicit instruction is a bug (and what this thread is about). I know you must read a lot of these bug forum posts everyday, but simply reading one off-hand comment by a frustrated Unity user and adding a retort to an otherwise legitimate issue is a little unprofessional, belittling, and, well, frustrating.
Having the same issue, setting the Screen.fullScreen variable actually made the problem worse for me. Complete failure, a quarter of my monitor was filled with black until I cntrl-alt-del escaped the executable. Can’t say much more than that, it just started happening to my builds. Every time I attempt to build it simply defaults to full screen, no matter what I name the build or the location I build it to. About to restart my computer…
EDIT: Scratch that, Unity is completely busted. Every build is ignoring all build settings. Attempting a re-install…?
EDIT 2: After uninstall/re-install of Unity Editor, and wrestling for 4.5 hours I finally fixed it. It appears that having the D3D11 Force Exclusive Mode checkmark was at the crux of the issue. Whenever it is checked my builds are ignoring almost all build settings, most notably the Windowed checkmark. It always opens full screen when this checkbox is selected, and at an unknown resolution. I’m on Windows 8.1, Unity 4.6.5. However, judging by Graham’s previous response, Unity appears unwilling to solve this issue making my effort for naught. Shame…
Also, on Windows 7 we often can’t force the resolution dialog screen to appear when starting the app while holding any combination of alt, control or shift when starting the app. It works fine on OS X (hold option while opening the app). Creating a shortcut to the app and using the commandline argument ‘-show-screen-selector’ also doesn’t work for us. It appears that the player setting for the resolution dialog gets confused sometimes between enabled, disabled, or hidden by default.
Screen.fullScreen = false;
This successfully keeps my game from running fullscreen (Mac standalone), but my splash screen is still fullscreen until this code loads. Is there a way I can insert this into the splash’s code?
Well, you could just change the company name, i.e. temporarily, in the Player Settings, so that a new entry in the registry is made. This works for me every time.
LOL - I was going to do this today. I have a game that runs in letterboxed 4:3 and just won’t go fullscreen no matter what I do. I got it working on my dev machine by enabling the resolution dialog, changing it there, and then disabling it - and now it runs fullscreen. Was going to do this on the prod machines today… but won’t simply deleting the registry key for it have the same effect? Seems simpler…