Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

How to Read iOS Device With Unity 5?

$
0
0
Hello, I am trying to resize screen view of my game by reading the iOS device. Actually, i only resize it for iPAD devices. But the code i give below doesn't seem to work. When i run the project in iPAD simulator of xCODE, it doesn't read the code and resize the game. What's wrong with these codes or what should i use to read the iOS devide? if(UnityEngine.iOS.Device.generation == UnityEngine.iOS.DeviceGeneration.iPad1Gen || UnityEngine.iOS.Device.generation == UnityEngine.iOS.DeviceGeneration.iPad2Gen || UnityEngine.iOS.Device.generation == UnityEngine.iOS.DeviceGeneration.iPad3Gen || UnityEngine.iOS.Device.generation == UnityEngine.iOS.DeviceGeneration.iPad4Gen || UnityEngine.iOS.Device.generation == UnityEngine.iOS.DeviceGeneration.iPad5Gen || UnityEngine.iOS.Device.generation == UnityEngine.iOS.DeviceGeneration.iPadMini1Gen || UnityEngine.iOS.Device.generation == UnityEngine.iOS.DeviceGeneration.iPadMini2Gen|| UnityEngine.iOS.Device.generation == UnityEngine.iOS.DeviceGeneration.iPadMini3Gen) { ipadDevices = true; } I was using `iPhoneSettings.generation == iPhoneGeneration.iPad1Gen` in Unity 4.x but it seems that it's changed as this in unity 5; `UnityEngine.iOS.Device.generation == UnityEngine.iOS.DeviceGeneration.iPadMini3Gen`. I got no error when i type this but i think there is still something wrong. What could be the problem?

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>