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;

}

相关推荐
豆几的窝15 小时前
230+效率功能2026AI插件脚本大合集V7.0最新中文版支持Illustrator 2026-CS6 Win/Mac
ui·illustrator
孟无岐21 小时前
【Laya】Component 使用说明
typescript·游戏引擎·游戏程序·laya
weixin_4093831221 小时前
cocos shader三角流光
游戏引擎·cocos2d
Mars-xq1 天前
godot 毛玻璃效果着色器shader
游戏引擎·godot·着色器
绀目澄清1 天前
unity3d AI Navigation 中文文档
游戏·unity
绀目澄清1 天前
Unity 的AI Navigation 系统详细总结
人工智能·unity·游戏引擎
我命由我123451 天前
Photoshop - Photoshop 工具栏(58)锐化工具
学习·ui·职场和发展·求职招聘·职场发展·学习方法·photoshop
绀目澄清1 天前
Unity3D AI Navigation 详解:从基础概念到实战应用
unity·游戏引擎
小雨下雨的雨1 天前
Flutter 框架跨平台鸿蒙开发 —— Flex 控件之响应式弹性布局
flutter·ui·华为·harmonyos·鸿蒙系统
weixin_409383121 天前
cocos shader流光文字 不显示透明部分
游戏引擎·cocos2d