Is it possible to start an app (standalone PC Unity app) with a maximized window? The default resolution I put int the player is not exactly what I'm looking for: a window that expands in the whole available desktop working area (1 monitor) without interfering with the windows task bar.
If you want to maximize your standalone unity app running in Window Mode, you can do so by using Screen.currentResolution to get the current desktop resolution.
You can then use SetResolution with the desktop resolution, BUT you need to reduce the arguments width and height to give room for the Window borders.
My guess is that SetResolution was designed for fullscreen and it doesn't really do the job for when you need to change the Window size in Window Mode. SetResolution changes the client area e.g. rendered viewport within the Window. It seems that if SetResolution results in a window greater than the desktop resolution then Unity shrinks the window.
The workaround is to take your desired window size and subtract it with the current window border size.
In C# you can use the native method calls GetWindowRect and GetClientRect to calculate the border sizes.
answered Jun 12 '12 at 10:38 AM