Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 icywater · Feb 04, 2012 at 09:25 PM · iphone

How to check what iDevice your using and adjust GUI sizes according...

How would I check what iDevice I am on, and then change my guiElements accordingly? Would I do something like:

 if(iPhoneGeneration.iPhone4){
   // set up for retina
 }
 else{
 //set up for non-retina
 }

Also, does iPhone4 include iPhone 4S?

EDIT: Is there a way to publish only for iPhone 4's and above?

Comment
Add comment · Show 1
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
avatar image BerggreenDK · Feb 05, 2012 at 03:48 PM 0
Share

You dont wanna support iPad's I guess? I have an iPad2 and I must say that I never pay for Apps that are iPhone designed. They are too small on my screen and in the 2x mode they look too pixelated.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Aram-Azhari · Feb 04, 2012 at 10:06 PM

 if (iPhone.generation == iPhoneGeneration.iPhone4S)
 {
    ....
 }
 else
 {
 }
Comment
Add comment · Show 8 · 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
avatar image icywater · Feb 04, 2012 at 10:18 PM 0
Share

is there a way to only publish my app for iphone 4 users and up?

avatar image Aram-Azhari · Feb 04, 2012 at 10:49 PM 0
Share

what do you mean by publishing? Are you actually talking about the 'build' in unity? or are you talking about submitting to app store only for iphone 4 users?

If second one is your question, you should be asking the apple company and unity answers is not the place for it.

avatar image icywater · Feb 04, 2012 at 11:10 PM 0
Share

ok, how come I don't see iPhoneGeneration.iPhone4s in the Unity scripting reference?

avatar image equalsequals · Feb 04, 2012 at 11:18 PM 0
Share

Depending on what version of Unity you are using, if it was pre-4S release there won't be an enum for it.

avatar image equalsequals · Feb 05, 2012 at 03:26 PM 1
Share

4s came out after 3.4.2, so if that is the version you are running there is no enum for it. Also, through XCode you can set a $$anonymous$$imum device - eg for me it is usually 3GS and above. I suggest taking a look at the iOS dev center's docs for doing that as Unity won't handle that for you.

Show more comments

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.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Unity Iphone and GUITextures 1 Answer

How could I create a dynamic cartoon style speech bubble? 1 Answer

Infinite swing with SpringJoint 2 Answers

I am having a problem with momentum of an object after releasing a touch from the iPhone. 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges