Search Issue Tracker

By Design

Votes

0

Found in [Package]

1.0.1-preview

Issue ID

1119624

Regression

No

Sprites are too small when maximizing game window on a large resolution display

Package: 2D Pixel Perfect

-

How to reproduce:
1. Set your display screen resolution to 4096x2160
2. Open the attached project
3. In Build Settings, switch the Target Platform to "UWP"
4. Make sure, that in "Resolution and Presentation" settings option "Default Is Full Screen" is enabled
5. Build the project
6. After build finishes, open the .sln file in Visual Studio
7. Run Player on Local Machine with Debug | x64 options
8. Observe the size of the sprites in the scene once it launches
9. Repeat steps 4-7 with the option "Default Is Full Screen" disabled
10. Launch the game again and maximize the window
11. Observe the size of the sprites in the scene once it launches

Expected result: On a display with 4096x2160 resolution, sprites in the game are similar size when the game is launched in a full-screen mode and when it is launched in a windowed mode and then maximized.
Actual result: On a display with 4096x2160 resolution, sprites in the game are significantly smaller when the game is launched in windowed mode and the window is maximized, than when it is launched in the full-screen mode.

Reproducible with - 2018.3.0a5, 2018.3.5f1, 2019.1.0b3, 2019.2.0a5

Note: Not tested on versions prior 2018.3.0a5 due to package errors and because Package Manager was not introduced yet.

  1. Resolution Note:

    Thanks for trying out 2D Pixel Perfect with your project! However, according to the repro project you sent us, your game isn't a pixel art game, which is what the Pixel Perfect Camera is designed for. Unless there is a certain reason, generally Pixel Perfect Camera shouldn't be used in a non-pixel-art game as the problems it solves are unique to pixel art.

    As for the reason why the cards look a lot smaller in windowed mode than in full-screen mode, it has something to do with the Reference Resolution you set. In your repro project it's set to 1920 * 1080. What this means is your viewport can only scale to a multiple of this resolution. When in 4K full-screen, the effective resolution is 3840 * 2160, which is exactly 2 times of 1080p, in this case the viewport (and the cards) scales a nice 2X and will keep the framing you see in the editor. When you start the game in windowed mode and maximize it, the effective resolution is smaller than 3840 * 2160 (due to the space taken by the title bar), in this case the cards can't scale and stay at 1X, and they look the same as if you're running at 1080p windowed.

    Again, we don't see a reason to use Pixel Perfect Camera in your project in the first place. Please let us know why if you have to use it. For now we'll resolve this bug as By Design.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.