Game view scale always resets to 2x

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.

1 Like

Looks like this also happens whenever scripts finish compiling.

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.

Ok, now this is very odd. I closed all editors then created a new project via the Hub.

Now the slider’s minimum value is 2x:

So I can’t actually set it back to 1x. Very interesting. It this point I’ll definitely make a bug report. :slight_smile: But I don’t know how to reproduce it.

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?

Opening up older projects shows a minimum value of 1.x but it keeps jumping up to 2x.

i’ve seen these solutions,
http://answers.unity.com/answers/1489349/view.html

2 Likes

Changing “Low Resolution Aspect Ratios” does let me go down to 1x. Thanks @mgear !

However, it does not fix Unity jumping to 2x whenever I go into play mode or compile scripts. It does that regardless of the state of the checkbox.

2 Likes

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:

  1. Switch to “PC, Mac & Linux Standalone” platform.
  2. Click on Resolution and un-tick “Lo -Resolution Aspect Ratios” there.
  3. 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.

16 Likes

This worked! Thanks so much @PixelEnvision .

Still a Unity bug, I only started getting this odd behaviour in b5.

Hello,

We haven’t seen this issue so far, it would be very useful you could submit an issue with Unity’s Bug Reporter (Help > Report a bug)

Thanks!

Already uploading! :slight_smile: I’ll post the number when I get it.

@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…

1 Like

Bug number: 1134391

Thanks for reporting! You can check the progress on the resolution of this issue here: Unity Issue Tracker - The Game View Scale changes from 2x to 1x when transitioning from Edit to Play mode

Yes, please address this issue! It’s beyond annoying having to adjust that slider on every play.

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?

1 Like

Not professionally. Do you have examples of what it’s doing right in that regard?

Great, I’ll check it out. Thanks!

Any chances of this fix entering 2019.1.6? It’s so incredibly annoying, mine always resets to 1x…

Using 2019.1.5 right now, and this only happens on one of my projects…

(And it doesn’t have any code that messes with resolution or scale or the editor at all)