Browse Source

修复下一局重开时,有的单位自带护盾特效的bug

大爷 1 year ago
parent
commit
667ee53805

+ 1 - 1
Unity/Assets/Scripts/Codes/HotfixView/Client/Effect/EffectMgr.cs

@@ -240,7 +240,7 @@ namespace ET.Client
         {
             foreach (var epi in playingList.Values)
             {
-                GameObject.Destroy(epi.GameObj);
+                GameObjectPool.Instance.RecycleObject(epi.GameObj);
             }
             playingList.Clear();
         }

+ 3 - 0
Unity/Assets/Scripts/Codes/HotfixView/Client/Global/GlobalViewMgr.cs

@@ -38,6 +38,9 @@ namespace ET.Client
         {
             ModelViewComponent.Instance.IsHideNormalName = false;
             CameraMgr.Init();
+            EffectMgr.Instance.Clear();
+
+            TiktokGiftEventHandler.Reset();
         }
     }
 }

+ 0 - 4
Unity/Assets/Scripts/Codes/HotfixView/Client/Unit/UnitRenderSystem.cs

@@ -82,10 +82,6 @@ namespace ET.Client
                 unitRender.NameBar.visible = true;
                 unitRender.IsVipName = true;
             }
-            else
-            {
-                Log.Error($"Not Found unitRender: {args.ObjId}");
-            }
         }
     }
     [Event]