• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by james 6 · Mar 29, 2011 at 08:59 PM · guiiphoneimage

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?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Posting an image with a link using Prime31 Social Networking plugin 1 Answer

Creating a next and previous Tutorial 1 Answer

How to change button image on click 2 Answers

Image becomes distorted when running on IOS 2 Answers

useGUILayout=false does not honor GUI.depth 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges