Troubleshoot code and Resolution and Presentation panel setup issues
If the program still does not run at the expected resolution, it should be that the system registry has recorded the corresponding settings.
solution:
Open the registry, use the shortcut key "Win" + "R" combination shortcut key. Type the command after opening: Regedit
registration form
Registry path:
- HKEY_CURRENT_USER\Software\ [CompanyName] \ [ProductName]
Just look at the name of the Key to know which parameter it represents, which is very straightforward
problem analysis
- Using a TV as a monitor is more prone to these problems, just look at the registry;
- Screenmanager Resolution Width_h182942802, Screenmanager Resolution Height_h2627697771, when the values of these two keys are inconsistent with the resolution set in your program, it is true that there is a problem here, just change it to the required resolution, pay attention to the base system.
- Screenmanager Fullscreen mode_h3630240806, see this for full screen problems.
Reduce the chance of problems
Resolution panel
- Then set the required resolution in Awake,
-
Screen.SetResolution(1920, 1080, true);
-
Screen.fullScreen = true;
or:
Then follow the path to find the registry
HKEY_CURRENT_USER\Software\ [CompanyName] \ [ProductName]
CompanyName is the company name in the package
ProductName is the project name in the package
Delete this piece of data directly, or change the company name, re-register the project name, and run the project again