PlayerSettings are ignored when building windowed/fullscreen.

I think I have a similar problem with 2018.2 but it is so bad now! - wanted windowed only app

I ran my app and it was fullscreen and I could not switch to windowed (probably because I turned off fullscreen switch in player settings),
so then I turned on display resolution dialog in settings and tried running non windowed at low resolution - it just ran fullscreen but lower resolution!! (maybe I got tick box wrong but I set fullscreen mode to windowed)
so then I deleted registry key entries and ran again and finally it works

Seriously Unity if an app disables some feature like fullscreen in player settings, then don’t allow an app to run fullscreen - even if previously saved settings say to do so because that just causes a headache!

Right, it’s just one of those funny long-term bugs in Unity.

It has not been fixed for years and years and they will probably never bother fixing it.

You just have to clear the registry over and over. :confused:

2 Likes

and for mac?

From the terminal run:
defaults delete com.whatever.whatever
where com.whatever.whatever is your app’s identifier.

Thanks!

2019.3f issue still persists.

2 Likes

There is a very simple solution for this bug, just make the Display Resolution Dialog enabled and uncheck the Allow Full Screen Mode. It will work fine and also you can resize the window.

It’s 2020 and this is somehow still a bug in the engine, and one that I run into pretty often.

It hurts most when deploying builds to testers when we’ve changed default screen settings or want to lock the screen to a certain res in a prototype app given to clients. This can create very annoying bugs where the client is using an unsupported resolution they set before the new build.

At the very least have check for incremented version number and a check box (or API function) to optionally reset the user’s window size settings.

1 Like

You could provide a batch file which deletes the registry keys holding the screen settings. Provide that to any testers who have previously tested your game before you changed the default settings.

Or you could in your first scene check the current screen settings and if they are unsupported just force them to the correct settings.

2020 and this bug is still here. Particularly for ‘resizable window’. After reading the post I altered the company name and seen resizable windows working. Before that the resolution settings did not make any change. I’m using linux so the above solutions do not work. If starting my game in full screen mode as well, and i switch it with in game settings, it’s still not resizable. It gets stuck. not to mention there is no way to change what display it starts on or anything. There’s only (display.Activate()) which doesn’t actually change what display the main window is on.

For such a long surviving game engine it seems that for the basic stuff it can’t do right. At least for new engines like Godot, I don’t expect this to be a problem. If it’s open source it can get fixed a lot quicker.

It is utterly amazing that Unity have this completely fucked-up.

It is just flabbergasting.

There are multiple bad bugs around the issue.

2 Likes

Welp, I guess it’s my turn. My game is launching full-screen every time and I do not want that. I can set Screen.FullScreen = false on startup, but it still launches full-screen and then shrinks down, which looks like garbage.

I’m on a Mac, so no registry keys here. I tried the defaults delete trick to no effect. And my player settings do not have the “Display Resolution Dialog” option:

I’m tearing my hair out. Any ideas?

its a total disaster @JoeStrout

it is beyond belief that Unity have scrtewed this

one tip that may or may not help, regarding PLAYER / COMPANY NAME

just change it slightly. do, I go fattie, fattiex, fattieY, fattie2x etc etc

do that and build again -it may help

ALSO ***

in a recent build we had to “Create Xcode Project” and use the build in there. if you are doing that dont forget that, annoyhingly, you MUST, in the Xcode project, clean and then build again, due to the idiotic way caching works.

hope it helps somehow

Just ran into this issue on Linux. The equivalent prefs file to delete in in ~/.config/unity3d/<PROJECT_NAME>

Edit: It seems this is not enough… deleting the entire .config/unity3d folder resolves the issue

Please file a bug report so we can look into this and see if its something we could improve.

bug #1312398

1 Like

This is annoying… Where are these settings even stored? I’ve cleared player prefs and deleted the application folder in “~/Library” - I deleted the entire project Library folder and forced a complete re-import and re-build. I’ve changed company name, deleted and renamed the app, and I’ve restarted Unity numerous times… Nothing works, it just completely ignores the build settings and there is no way to get the game to not launch in fullscreen (Even though it worked fine before I switched to fullscreen).

Remembering the settings when there is no way to un-remember them qualifies as a bug IMO, not a feature.

(This is on OsX, Unity 2021.1.15f1)

2 Likes

Try ~/Library/Preferences/com.company.gamename.plist

Oh, and macOS caches stuff like this so you might find that you have to flush the preferences from the terminal.

On Linux, a reliable workaround is

  1. Close the Unity Editor
  2. Delete ~/.config/unity3d/COMPANY_NAME/PRODUCT_NAME/prefs
  3. Open Unity Editor and build
1 Like

If many people are reporting it even in a forum why don’t you file the report yourself or just fix it? I know it’s easier to have bugs filed for you but sometimes it must just be better for the Unity team to look into things themselves for the sake of their own product, rather than ignoring a decade old bug forum thread until it appears in a report…