Unity 2D : How to support multi platform and different aspect ratio devices in Unity 2D?
Asked Answered
U

1

9

I am newbie to Unity 2D and creating a game in it. I wanted to run that game on almost all devices (Android, iOS, Mac, Windows and web. I am bit curious to see how Unity2D will handle this scenario and give the same user experience on various devices.

Also I noticed that I can preview my game in different aspect ratios. Is it the aspect ratio of the screen (like how the game would look on this type of screen) or of the camera (would look the same on all screens)? Do I need to provide different image resources based on the device's resolution?

Should I do something special to allow support for different resolutions, aspect ratios, etc?

Any help will be appreciated.

Uncommitted answered 29/9, 2014 at 12:54 Comment(0)
L
3

Aspect ratio management is explained in the following blog post: http://2sa-studio.blogspot.com/2015/01/handling-aspect-ratio-in-unity2d.html

Basically the orthographic camera has a size parameter which defines the half-height of the world area which will be rendered on screen.

Unity strategy is: fit rendered area height to screen height. Then the visible width varies depending on the screen ratio.

Lunn answered 26/2, 2015 at 14:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.