- Home /
make game work on older iphone
hi i made my game work on the iphone4, now i try to run my app on a iphone 2g the image sizing gets messed up especially the gui. How do i take care of this?
Answer by Bampf · Mar 29, 2011 at 09:19 PM
Sounds like you are using OnGUI?
You can set GUI.Matrix to tell Unity to scale the GUI that's being drawn. I haven't done it that way, but that's probably the easiest solution. However, the results will be scaled so fine details and text may not look as good. (If you search Answers.unity3d and other places you can find code examples.)
The other way is a lot more tedious: you change the coordinates you use for every element, and potentially other things like font, border widths, guistyles, etc. In other words, you painstakingly lay out your interface for each new resolution you want to support. The results will look good, and you can do things like add extra GUI controls for high-res screens, or change the layout for iPad versus iPhone versus web player. But its tedious work, requires each resolution be retested, and your OnGUI scripts will end up having extra logic. For a sense of what this logic might look like, see my answer to this question: http://answers.unity3d.com/questions/30636/how-to-support-retina-display/30658#30658