Advertisement

Why game window automatically scale itself when I press play?

Started by March 28, 2017 02:09 PM
9 comments, last by frob 7 years, 8 months ago

When I am in the Unity editor and I press play to test my game something weird happens,
the game window is like zooming in.. and I am not touching anything, the scale slider just goes from x0.41 to x1.
What may cause the problem? Bug in the editor?

Thank you in advance.

PS:
I noticed that the problem is only with my custom game windows, their initial scale is 0.41 and not 1, why is that?

Which editor?

Advertisement

Which editor?

Unity editor.

Anyone?

Reset your window layout and it will probably make it all go away.

I'm guessing you saved your layout with the wrong scale level, and it keeps getting restored to the wrong values.

The game view scale was needed to support high-dpi development on regular-dpi devices, or if you have a high pixel-density screen and want to preview small-pixel devices. That way you could view what the game view is supposed to look like on displays that don't match your own.

Perhaps you are on a relatively small 1024x768 display, but your game window needs to preview the world as it looks on a 4K monitor with a 4096x2160 display. In that case you'll need to zoom the game window out to view it. Or maybe you've got a nice 4K display yourself and are making games for a smart phone, you will want to zoom in so you're not looking at a tiny square.

Reset the scale level to 1 (unless you need a different value for those reasons) then stop touching it. Save your layouts with the 1.0 scale, and then pretend the slider doesn't exist.

Reset your window layout and it will probably make it all go away.

I'm guessing you saved your layout with the wrong scale level, and it keeps getting restored to the wrong values.

The game view scale was needed to support high-dpi development on regular-dpi devices, or if you have a high pixel-density screen and want to preview small-pixel devices. That way you could view what the game view is supposed to look like on displays that don't match your own.

Perhaps you are on a relatively small 1024x768 display, but your game window needs to preview the world as it looks on a 4K monitor with a 4096x2160 display. In that case you'll need to zoom the game window out to view it. Or maybe you've got a nice 4K display yourself and are making games for a smart phone, you will want to zoom in so you're not looking at a tiny square.

Reset the scale level to 1 (unless you need a different value for those reasons) then stop touching it. Save your layouts with the 1.0 scale, and then pretend the slider doesn't exist.

Unfortunately resetting the layout didn't work. The game view scale level is related to the actual game view window size. When I make the game view window smaller then the scale level automatically changes.

So now, with my current game view window size, my scale level is 0.28 and when I start the game it goes automatically to 1, then I need to go and change it back to 0.28 every single time after I press play.

I am almost certain that it's a bug. I use Unity for almost a year and stuff like this happen regularly, this is so frustrating..

Advertisement

There was a similar bug, but found and fixed about a year ago so it should still be among the regression tests. You can search the bug database to see if your specific variation exists.

I suspect yours is as designed since it switches when you start the player and reverts back once you stop the player. You're generally not supposed to scale in the way you describe.

There was a similar bug, but found and fixed about a year ago so it should still be among the regression tests. You can search the bug database to see if your specific variation exists.

I suspect yours is as designed since it switches when you start the player and reverts back once you stop the player. You're generally not supposed to scale in the way you describe.

When the scale level is 0.28 I see the whole game like in any other normal project, but when the scale level is 1 it looks like I look at my game with a magnifying glass. I don't understand why the default scale is not 1 in my project.. maybe it's a problem with the project itself, I don't really know.. I will send a bug report soon. Thanks for your help, I appreciate it very much.

when the scale level is 1 it looks like I look at my game with a magnifying glass.
So the Game View window is set to us a much higher resolution than your native display.

On the control bar, what settings do you have for the display? Is it set to a specific resolution, free aspect resized to the window, or something else?

Also, if you are on a mac, is the "Low Resolution Aspect Ratios" box checked?

when the scale level is 1 it looks like I look at my game with a magnifying glass.
So the Game View window is set to us a much higher resolution than your native display.

On the control bar, what settings do you have for the display? Is it set to a specific resolution, free aspect resized to the window, or something else?

Also, if you are on a mac, is the "Low Resolution Aspect Ratios" box checked?

A specific resolution 1920x1080. Also my native display is 1920x1080.

When I choose 16:9 and not a specific resolution then the scale level starts from 1 :wacko:.

This topic is closed to new replies.

Advertisement