Search Issue Tracker
Fixed
Fixed in 2023.2.10f1, 2023.3.0b5
Votes
4
Found in
2023.2.0a23
2023.3.0a2
Issue ID
UUM-42833
Regression
No
[Game View] The editor is reading the displace scale from the Primary Monitor when the Editor is on a secondary Monitor thus adjusting the Game View Scale to 1.3
Update 2023-11-14 (Kevin): The PR from the bisection causes the game view scale to snap to whatever the EditorGUIUtility.pixelsPerPoint is whenever that updates. The root bug is that certain EditorWindow / GUIView / HostView code paths will try to grab the platform's monitor scaling and incorrectly grab the scaling from the wrong monitor. This is an extremely difficult to reproduce bug that requires the editor to be in a very specific state where performing some action (that does something with windows... e.g. opening a context menu which is an EditorWindow).
Steps to reproduce:
1. Open the attached project "Test Project.zip"
2. Have 2 displays, primary set as 4k with 125% display scale and secondary at 1080p with 100% display Scale
3. Move the Editor to Display #2 (set as 1080p)
4. Enter Play Mode
5. Observe the Game View Scale Slider
Expected results: display scale is read from the display it's presented on, not the primary display, and 1x scale is applied to Game View
Actual Results: The editor is reading the displace scale from the Primary Monitor when the Editor is on a secondary Monitor thus adjusting the Game View Scale to 1.3
Reproducible in: 2021.3.28f1, 2022.3.0f1, 2022.3.5f1, 2023.1.5f1, 2023.2.0a23, 2023.3.0a1
Not reproducible in: 2022.2.21f1
Environment tested on: Windows 10
Notes:
-A workaround is to turn off Low-Resolution Aspect Ratios, however, that option is only available if the Display Scale of a Monitor is set to 125%
Comments (11)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
snlehton
Mar 06, 2025 12:20
I'm on Unity 6.x and I've noticed that the problem happens when I'm on some other platform than Standalone.
The fix is to switch to Standalone, then disable the lowres setting, and then switching back to whatever platform you were on.
More details:
https://discussions.unity.com/t/game-view-scale-on-compilation-play/217998/8
sarahnorthway
Feb 19, 2025 20:14
I'm still seeing this issue in a fresh project with fresh install of 6000.0.38f1. I have multiple monitors and my primary 4k one has 150% font size. My Game tab is popped out and displayed on my second 2k monitor with 100% font size. Every time I hit play the Game tab scale slider changes back to 1.5x.
I can temporarily fix it by closing the game tab and opening a fresh one, but I'm sure it will be back. I've noticed this problem since at least Unity 2022.
lPVDl
Oct 18, 2024 05:03
2022.3.44f1 not fixed. 1 monitor here is pastebin(com)/n7vkigHq
colonderp
Sep 05, 2024 16:22
Ran into this problem after 'upgrading' from 2023.1.10f1 to 2023.2.20f1.
As a workaround, put this script in Assets/Editor/
----
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
public static class GameViewScaleFix
{
static GameViewScaleFix()
{
// Subscribe to play mode state changes
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
}
private static void OnPlayModeStateChanged(PlayModeStateChange state)
{
// Check if we just entered play mode
if (state == PlayModeStateChange.EnteredPlayMode)
{
// Reset the Game view scale
ResetGameViewScale();
}
}
private static void ResetGameViewScale()
{
// Find the Game view window
var gameViewType = typeof(Editor).Assembly.GetType("UnityEditor.GameView");
var gameView = EditorWindow.GetWindow(gameViewType);
// Use reflection to get the private "m_ZoomArea" field in the Game view
var zoomAreaField = gameViewType.GetField("m_ZoomArea", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
var zoomArea = zoomAreaField.GetValue(gameView);
// Get the "scale" field of the zoom area (it's actually a field, not a property)
var scaleField = zoomArea.GetType().GetField("m_Scale", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
// Set the scale to (1, 1) to reset the zoom
scaleField.SetValue(zoomArea, new Vector2(1f, 1f));
// Repaint the Game view window to apply the change
gameView.Repaint();
}
}
KrynosStudios
Dec 27, 2023 12:57
I have found a working workaround for this issue for anyone who has the same problem.
1. Right click on the "Game" tab at the top of the screen
2. Click "Close tab"
3. Right click on an open tab and select "Add tab > Game"
4. Change view from "Free aspect" to desired resolution
5. Change scale to desired value and hit play
Now the game will start at the proper scale every time.
BiscuitsMx
Nov 13, 2023 13:20
The workaround doesn't work for me, as "Low-Resolution Aspect Ratios" is greyed out (my main, primary monitor, where my game window is, has scale set to 100%, which greys out and ticks "Low-Resolution Aspect Ratios"). My other monitor (has the console window on it) has scale set to 125%, which causes the 1.3x scale problem for me.