浏览代码

该Entity已经包含组件判断。。

xyh1985 1 年之前
父节点
当前提交
9c338c35a4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Unity/Assets/Scripts/Codes/Hotfix/Client/Login/LoginHelper.cs

+ 1 - 1
Unity/Assets/Scripts/Codes/Hotfix/Client/Login/LoginHelper.cs

@@ -48,7 +48,7 @@ namespace ET.Client
                     Log.Error($"登陆game错误...errCode={g2CLoginGame.Error}");
                     return;
                 }
-                if (ConstValue.SessionTimeoutTime > 0)
+                if (ConstValue.SessionTimeoutTime > 0 && gameSession.GetComponent<SessionIdleCheckerComponent>() == null)
                 {
                     gameSession.AddComponent<SessionIdleCheckerComponent>();
                 }