- Home /
How do you account for iPhoneSettings.generation not working in the Editor?
iPhoneSettings.generation always Unknown ((int)iPhoneSettings.generation is zero) in the Editor, but you need to adjust values based on resolution, like:
[SerializeField] float worldUnitsPerPixelSwiped;
void Awake () { if ((int)iPhoneSettings.generation < 7) worldUnitsPerPixelSwiped *= 2; }
What do you do?
Answer by hypnoslave · Feb 20, 2011 at 07:08 AM
call me super cheap and hacky, but I'm just using a
if(Screen.width == (whatEverTheEarlyGenIPhoneRezIsIForget))
doShit();
I like your pseudocode ;-), but unfortunately that only works if you set the size to one of the smaller pixel dimensions, in the Game View. I like to just keep it at 2:3 or 3:2, so it's as big on-screen as possible.
Answer by Robindoo · Feb 20, 2011 at 07:13 AM
You have to export into your phone in order to test it out the iPhone generation. Unity remote cant detect whether your are using iPhone3GS or iPhone4.