// 判断当前运行平台为Android平台时
if (Application.platform == RuntimePlatform.Android) {
    if (Input.GetKeyDown(KeyCode.Home)) {    // 按Home键
        Application.Quit();                 // 退出程序
    }
    if (Input.GetKeyDown(KeyCode.Escape)) { // 按返回键
        Application.Quit();                 // 退出程序
    }
}

 

相关文章:

  • 2021-05-12
  • 2021-05-28
  • 2022-12-23
  • 2022-03-01
  • 2022-12-23
  • 2021-12-28
  • 2021-06-30
猜你喜欢
  • 2022-02-11
  • 2022-03-03
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
相关资源
相似解决方案