iPhone 5 game view is not pixel perfect

When I select iPhone 5 for the game view (in my case, wide), it scales the viewport to fill the size of the view while maintaining a 16:9 ratio. This is not representative of what will actually appear on the phone’s screen. It needs to be fixed at 1136x640.

It would be very nice for this to be working so I could prepare proper screenshots to upload to iTunesConnect without needing an iPhone 5 in hand (mine hasn’t shipped yet). As is, I’ll need to put considerable time into Photoshop to create correct shots.

But first I’m going to try to size my window exactly, which could take a while to get just right.

Here’s a trick…Just create a 1136 wide image file and open it in the background. You can use that to align the game view to be 1138 wide. It needs to be 1138 wide so the height will be 640 (due to 16:9 rounding I think). Then crop it to 1136x640.

Here’s a workaround:

Set your platform to PC/Mac and then in the player settings set the default screen height and width.

This will then appear in the game view as an option and you can use that to take your screenshots as you normally would.

Or one could use Xcode’s device simulator, too.

Take a 16:9 screen shot and resize in photoshop to 1136x640. 1 minutes work.

Wouldn’t quite work with my game, as the graphics are all 2D. So if the size isn’t exact, the pixel-perfect graphics look blurry.

I didn’t know Unity worked in Xcode’s device simulator! Just never tried it. I’ll give that a shot.

But he loses the pixel perfection effects in the screenshot, then has some scaling effects in the final 1136x640 image. It will be a poorer image compared to capturing a 1136x640 shot.

I hope a 1136x640 Game screen option does get added, it makes things a lot easier, and solves any issues that workarounds create.

Here is a workaround (make sure you save your screen layout so that you can return to it easily) you could use:

Undock your Game view so that it is free floating.
Add the line of code below to an function Update that will be in use continuously in your game.
Run the game in Unity and you should see the screen size show up in the bottom-left corner of your main Unity window.
Drag the corner of the Game view and you will see the size your window is producing. Keep going until it is correct. Unfortunately you will probably have to go with 1138x640 and crop any images you take to 1136. Hopefully this will not cause any problems with anything you have aligned to the screen edge.

print(Screen.height.ToString() + ", " + Screen.width.ToString());

True but the general public don’t care about such things.

I too would like there to be a normal 1136x640 game view option. Why isn’t there one, but there is for the other iPhone devices?

If you free float your game window, and then open the Stats window on the game screen, you can resize the game screen until in the Stats window you see “Screen size : 1136x640”… No need to write any code for it. This is what I do. Not sure if you can save this then.