Hi,
I would like to have controls differently for my game on Android Tablet and Phone devices.
This is to make sure, users are comfortable with the controls and they are handy.
Is there a way that I can do this ? If there is a known plug-in or something, please do let me know.
Thanks,
u may use android.input!!!
Use the following class to determine screen size (in dpi) and whether it’s a phone or a tablet.
using UnityEngine;
public static class DisplayInfo {
public static float GetScreenSize() {
float curDPI = Screen.dpi;
if (curDPI == 0f) // Win, OSX or WP8
curDPI = 96f;
return ((Mathf.Sqrt(Screen.width*Screen.width + Screen.height*Screen.height)) / curDPI);
}
public static bool IsTablet() {
return (GetScreenSize() >= 6f);
}
public static bool IsPhone() {
return !IsTablet ();
}
}