|
|
@@ -1,6 +1,7 @@
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
using UnityEngine;
|
|
|
+using UnityEngine.UI;
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
|
//持久化的处理脚本,在app启动时就应开始常驻
|
|
|
@@ -27,7 +28,20 @@ public class MenuBackController {
|
|
|
long lastPressExitTime = 0;
|
|
|
public void Update()
|
|
|
{
|
|
|
- if (Input.GetKeyDown(KeyCode.Escape)) HandleKeyDownEscape();
|
|
|
+ if (Input.GetKeyDown(KeyCode.Escape) || CommonConfig.StandaloneMode && Input.GetKeyDown(KeyCode.Space))
|
|
|
+ {
|
|
|
+ HandleKeyDownEscape();
|
|
|
+ }
|
|
|
+ if (CommonConfig.StandaloneMode)
|
|
|
+ {
|
|
|
+ //暴力取消导航
|
|
|
+ foreach (var item in Object.FindObjectsOfType<Button>())
|
|
|
+ {
|
|
|
+ var nv = item.navigation;
|
|
|
+ nv.mode = Navigation.Mode.None;
|
|
|
+ item.navigation = nv;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
public void HandleKeyDownEscape()
|
|
|
{
|