How to detect iPadMini2Gen device ?

I wanted to detect whether whether i am running my game on iPad mini 1 or 2 nd generation.
iPhoneGeneration enum only has options to detect iPadMini1Gen

is there a way to detect iPad mini 2nd generation?

I am using Unity 4.3

2 Answers

2

Update to the latest version of Unity. The enumarator now has gen 2.

Is there a way to do this without updating unity?

4.5.0 added:

iPhoneGeneration.iPad5Gen

iPhoneGeneration.iPadMini2Gen

You can check out the changes here:
Scripting API changes

Is there a way to do this without updating unity?

@wijesijp, you would have to create a plugin in xcode to send the information to unity, but it wouldn't be as a compiler directive since thats internal to the Unity Engine. It's reasonable to conclude that newer checks for system hardware will only be included in the newer versions of unity.

Is there a way to do this using SystemInfo.deviceModel ?

Are you worried that some scripts will change? In any case, try to see what SystemInfo.deviceModel will output if you play the file on an actual device. Though i'm guessing it'll say that it's an unknown ipad device.

@wijesijp, it might, if it was to work, you would get either iPad4,4 (WiFi version) or iPad4,5 (Cell data version) if it's not relying on anything internal in the unity engine as a look up