unity中平台判断

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;

}

相关推荐
不如摸鱼去3 小时前
uni-app 组件库 Wot UI 的 AI 友好型编程指南
人工智能·ui·uni-app
应用市场3 小时前
无人机动态推力分配与倾斜纠正原理详解
游戏引擎·无人机·cocos2d
大Mod_abfun3 小时前
AntdUI教程#1ChatList交互(vb.net)
服务器·前端·ui·交互·antdui·聊天框
少云清4 小时前
【UI自动化测试】2_IOS自动化测试 _使用模拟器
ui·ios
带娃的IT创业者4 小时前
UI 交互难题攻克:遮挡、弹窗、动态加载
ui·交互·文件上传·浏览器自动化·playwright·ui 交互·元素遮挡
weiyvyy4 小时前
无人机嵌入式开发实战-安全机制与应急处理
人工智能·嵌入式硬件·安全·机器人·游戏引擎·无人机·信息化
郭逍遥4 小时前
[Godot] 沃罗诺伊图生成算法
算法·c#·游戏引擎·godot
IMPYLH4 小时前
Lua 的 UTF-8 模块
开发语言·笔记·后端·游戏引擎·lua
修炼前端秘籍的小帅13 天前
Stitch——Google热门的免费AI UI设计工具
前端·人工智能·ui