Unity不同平台的判断

  if (Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.WindowsPlayer ||Application.platform == RuntimePlatform.Android)

RuntimePlatform.WindowsEditor 是在unity编辑开发平台
RuntimePlatform.WindowsPlayer是打包发布成pc端
Application.platform == RuntimePlatform.Android)是打包发布成安卓端

猜你喜欢

转载自blog.csdn.net/LCHUIHUI/article/details/88037707
今日推荐