public PlatformTypes mPlatformType;
// 设备类型枚举
public enum PlatformTypes
{
Mobile = 0,
Pc = 1
}
switch (Application.platform)
{
case RuntimePlatform.Android:
case RuntimePlatform.IPhonePlayer:
mPlatformType = PlatformTypes.Mobile;
break;
case RuntimePlatform.WindowsPlayer:
case RuntimePlatform.WindowsEditor:
mPlatformType = PlatformTypes.Pc;
break;
}