We recently had a user of one of our Unity extension products, Cinema Pro Cams, ask how to set a Unity Fullscreen Resolution when you build a game? Here is the forum article for those interested – https://cinema-suite.com/forum/viewtopic.php?f=18&t=152
Unity Fullscreen Resolution for Mac & Windows
After doing a bit of searching, I have found an answer that works for both Mac and Windows users. If you would like to use a resolution of, for example, 1024×427 (which is an anamorphic widescreen resolution); you must set the following player settings when you build your game:
Default is Full Screen = CHECKED Default is Native Resolution = UNCHECKED Default Screen Width = 1024 Default Screen Height = 427 Display Resolution Dialog = DISABLED Resizable Window = UNCHECKED
If you make sure these settings are selected, this will work when you run your game, and you will see the correct resolution. HOWEVER…many have reported this is not working. Here is why.
Why the Screen Size Resets
Whenever you build a new game using Unity, it saves a registry key (in windows) or a preference file (On Mac) under the Company Name You selected for the player settings. By default, this is “DefaultCompany”. Many (including myself) didn’t even know that Unity games did this when you build and run them.
If you are like me, you will continually do test builds quickly by deleting the folder you built to, and re-building, then running the exe or app. However, the registry key or preference file will still contain old display settings and other settings that are NOT overwritten when you hit build, if you are building using the same Company Name. This will lead to Unity using the nearest resolution that you have selected as a standard resolution supported by the video card.
How to fix the Size Reset Issue
To fix this, locate the following registry key in windows: HKCU\Software\[company name]\[product name] and delete the entire key and rebuild, then run the game.
In Mac, delete the corresponding preferences file located in ~/Library/Preferences/unity
Now when you build your game, your CUSTOM standalone resolution will work, either for fullscreen mode, or if you wish, windowed mode.
If you liked this Unity Fullscreen Resolution tip then check out our other Unity Tips & Tricks