- Home /
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?
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.
Answer by Aram-Azhari · Feb 04, 2012 at 10:06 PM
if (iPhone.generation == iPhoneGeneration.iPhone4S)
{
....
}
else
{
}
is there a way to only publish my app for iphone 4 users and up?
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.
ok, how come I don't see iPhoneGeneration.iPhone4s in the Unity scripting reference?
Depending on what version of Unity you are using, if it was pre-4S release there won't be an enum for it.
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.
Your answer
Follow this Question
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