ソースを参照

断线重连后台运行是不触发

guodong 2 年 前
コミット
2a2be578f8

+ 4 - 3
GameClient/Assets/Game/HotUpdate/Controller/LoginController.cs

@@ -257,9 +257,10 @@ namespace GFGGame
 
         public static async ETTask ReqReConnectGate()
         {
-#if UNITY_EDITOR
-            return;
-#endif
+            if(!Application.isFocused)
+            {
+                return;
+            }
             ViewManager.Show<ModalStatusView>("重新连接中...");
             int errorCode = await LoginHelper.EnterGame(GameGlobal.zoneScene);
             if (errorCode != ErrorCode.ERR_Success)