- Home /
Resolution scaling squashing on iOS and Android
I have a project I started back in Unity 5.6. I have not worked on it in a while and just started on it again.
I upgraded it to Unity 2019.1. I didn't get any errors and it seems to be working well except for one thing.
When I run the app in the Editor targeting iOS and using the iPhone XS Max 2688x1242 Portrait Game Window it looks fine. When I build and run for iOS and run it on my actual iPhone XS Max it is stretched vertically and looks distorted.
When I run it on my Android tablet which has a wider aspect ratio it looks fine in the editor, but is stretched horizontally on the actual tablet.
Can anyone help me fix this? I would have to have to start over.
Here are some screen shots:
This is from the editor for iOS XS Max:
This one is from the actual phone and is stretched vertically:
Answer by MoreDragons · Jul 30, 2020 at 06:37 AM
I have the same issue if anyone knows the fix. would be greatly appreciated.
Answer by Llama_w_2Ls · Jul 30, 2020 at 08:47 AM
Is your UI canvas set to scale with screen size? Try turning it off.
Thx for responding.
I figured out my particular issue.
I had added this line:
Screen.SetResolution(960, 1600, false);
At the start of my splash screen when deploying to ichi.io. Even though i've built the game to a 480 x 800 aspect it mucked things up on mobile.
removing this line fixed my mobile deployments.
Hope this helps someone in the future.