Hi there!
I have an important question. My games are made for a specific resolution (960x600) and they shouldn't be played in fullscreen mode because this totally breaks the UI and destroyes the (faked) pixel-perfect look. I'd like to have it like in AGS, where it's simply not possible to switch to fullscreen mode when you're running windowed mode.
Unfortunately, there are no "prevent fullscreen" functions out of the box in unity. Although the "Maximise" buttons at the right upper corner of the client's game window are disabled, "Alt + Enter" (windows) and "Command + F" (mac) switch to fullscreen. In linux the game window can resized at will which is really bad.
As a quick and dirty solution I call a custom action list containing "Screen.SetResolution (960, 600, false);" at the beginning of the game, at every scene start and when the pause menu is opened, so the player isn't locked forever in an ugly fullscreen window.
I also tried to check the resolution at every update and resize it if the resolution has changed, but this only worked on windows 7 and newer versions of windows. On mac, the screen constantly flickers and had other strange effects (drag and drop of icons wasn't possible anymore). Linux just ignored the "Screen.SetResolution" but it extremely flickers and makes the game unplayable.
Does anybody know how to tame window resizing on Linux and the fullscreen on all platforms? I don't think I'm the only Unity and AC user who has this kind of problems, am I?
Thank you very much!
Cheers,
Christian
Comments
enable full screen. display resolution dialogue etc.
Not sure about resize window tho. althoguh im sure i;ve come across code that disables the window (might have been linux thing)
https://www.reddit.com/r/Unity3D/comments/3k6kv0/unity_52_screensetresolution_problem/