Mobile device resolution mess, MultiResolution to rescue

Written by Jezek Patrick in the category Default



with the tags .



Developing for mobile devices is cool. But mobile devices have different screen resolutions and thus different aspect ratios:

2048x1536: iPad retina
1920x1080: iPhone 6 plus, Full HD, HTC one
1334x750: iPhone 6
1280x800: TF201
1280x768: WXGA
1280x720: 720p, HD ready
1136x640: iPhone 5
1024x768: iPad mini, iPad 1+2
960x640: iPhone 4
800x480: WVGA, Lumina 520
480x320: iPhone 3, iPod Touch

Currently porting happy fly to windows phone and we decided to refactor the whole app. This time I like to layout all elements depending on the mobile screen resolution.

Unity's 4.6 new ui could be a solution to this, but not all elements we show are gui.

I started to work on a MultiResolution Editor Extension for Unity3d to store location and scale of object for different screen resolutions.

It looks like in the editor:

MultiResolution editor extension for Unity3d

In the inspector it look like: