- Home /
How to adapt resolution on different versions of iphone?
Hello guys, well I created a game with Unity and it runs perfectly on the first 3 versions of the iphone and iTouch, well the problem is when I tested it on the new Itouch 4g with retina display, some of my gui textures went smaller they just stand on a corner of the screen, so I went and resized them to the new resolution, I thought it would now fit on both screens but it just doesn´t, it is now too big to play it on the older versions.
What can I do, does I need to create a code to fit the different resolutions or where can I adjust that because I have seen games that run on all verions.
Answer by DaveA · Jun 04, 2011 at 06:32 PM
Use the Screen dimensions and take a percentage of those rather than hard-coded pixel sizes. Although it would be very handy to know the physical resolution of the device sometimes, in DPI for instance. No way to do that that I know of.
Answer by gtjuggler · Oct 24, 2011 at 06:37 PM
Hey Noah,
We developed a solution called the MultiPlatform ToolKit that handles positioning, scaling, swapping materials, and other changes based on your target platform or aspect ratio. We used this extensively in our Snuggle Truck project.
Feel free to check it out - http://smuggletruck.com/multiplatform and specifically, take a look at Tutorial #1 which covers your question almost to a tee. The tool is available on the Unity Asset Store in case you're interested. Thanks!