Every time I press the play button the scale slider in the Game tab jumps to 2x. This means I need to slide it down to 1x to see the entire game view. But after I exit play mode and press the play button again it jumps back up to 2x.
I wanted to see if this was just me or if someone has a solution.
Can you reproduce this issue in a new project? Can you reproduce this issue in an older Unity version? Do you have more than one Unity editor open?
If something resets when entering play mode, it’s often related to Unity’s assembly reload, where it re-initializes a lot of things. It often reads settings via EditorPrefs, to restore settings, which is shared among editor instances.
You probably tried this already, but just to make sure.
Close all Unity editor instances
Open a single editor
Set slider to 1x
Close editor
Open your project and check if the issue persists
This should make sure that Unity writes this setting to disk/registry. So if an assembly reload occurs, Unity should pick up the extising values stored on disk/registry.
When I open up a 2018.3.0f2 editor (another new project) the minimum on the Scale slider is also 2x. So the minimum value of the slider is somewhere in config, not just the current value?
That was bothering me for a long time too, so it’s not exclusive to 2019.x. Today I’ve decided to find a solution, I’ve even put together a small editor script that fixes it by resetting it to “1” after a re-compile or on the play mode.
Then I think I’ve found the actual issue/solution, give this a try:
Switch to “PC, Mac & Linux Standalone” platform.
Click on Resolution and un-tick “Lo -Resolution Aspect Ratios” there.
Switch back to iOS/Android and try again…
That fixed the 2x issue for me. I think somehow a standalone target setting also affects other platforms, causing the issue.
@antoine-unity FYI, I think that’s only true for converted/upgraded projects, doesn’t seem to be happening with a new project.
Also, I think I’ve found a better fix. Above is working for 2x issue but if you have a larger than game view resolution and working with something like 0.8 scaling factor, it was still resetting it back to 1x on play mode.
Try quitting Unity and deleting ProjectSettings/EditorSettings.asset file. The file will be recreated with default settings on restart so you might want to take a note of your current settings before doing that.
That seems to be working on most (but not permanent on few) of my projects…
On a related note, we’re also working at re-designing this feature, which is causing a lot of confusing, even amongst ourselves.
The Low Resolution Aspect Ratios checkbox will be replaced with a pixel size selector. The Game view zoom slider won’t be affected by that value, and will snap to integer values. The computed scale factor of the Game view will be zoom value times the pixel size value.
We’re hoping this will be more intuitive. What do you think?