2023-02-25 23:04:03 -05:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class DeviceInfo
|
|
|
|
|
{
|
|
|
|
|
public static bool UsesTouchInput
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2025-03-21 18:37:51 -04:00
|
|
|
|
return Singleton<InputManager>.Instance.UsesTouchInput;
|
2023-02-25 23:04:03 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static DeviceFamily ActiveDeviceFamily
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return DeviceInfo.DeviceFamily.Android;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static bool IsDesktop
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
RuntimePlatform runtimePlatform = Application.platform;
|
|
|
|
|
return runtimePlatform == RuntimePlatform.OSXEditor || runtimePlatform == RuntimePlatform.OSXPlayer || runtimePlatform == RuntimePlatform.WindowsPlayer || runtimePlatform == RuntimePlatform.WindowsEditor;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum DeviceFamily
|
|
|
|
|
{
|
|
|
|
|
Ios,
|
|
|
|
|
Android,
|
|
|
|
|
Pc,
|
|
|
|
|
Osx,
|
|
|
|
|
BB10,
|
|
|
|
|
WP8
|
|
|
|
|
}
|
|
|
|
|
}
|