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;

}

相关推荐
布莱克60515 小时前
QtWidgets 与 QML:两大 UI 开发框架的全面对比
开发语言·c++·qt·ui·架构
Wanda121415 小时前
机器人与机电一体化3D数字孪生机器-Day5
人工智能·unity·游戏引擎·数字孪生
Wanda121416 小时前
机器人与机电一体化3D数字孪生机器-Day4
3d·unity·机器人·数字孪生
n87651 天前
Playwright Java WEB UI 自动化实现框架与逻辑
java·前端·ui
年少无知且疯狂2 天前
【Unity】Shader spine动画冻结效果
unity·spine
Cx330❀2 天前
深入浅出 Qt 绘图机制:从 QPainter 到四大图像类解析
开发语言·qt·ui·性能优化·图形渲染
淡海水2 天前
05-02-源码-Boehm GC标记阶段
算法·unity·c#·游戏引擎·gc
淡海水2 天前
05-03-源码-Boehm GC分配与碎片管理
开发语言·算法·unity·c#·游戏引擎·gc
Oll Correct2 天前
Adobe illustrator 案例十一:城堡图标绘制
ui·adobe·illustrator
沫璃染墨3 天前
《Qt从零入门系列(十四):QThread多线程详解——从线程创建到客户端阻塞处理》
开发语言·c++·笔记·qt·ui·交互·线程