diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/GuildMainCityPanel.lua b/Assets/ManagedResources/~Lua/Modules/Guild/GuildMainCityPanel.lua index 6ed9acfd5f..7594166abd 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/GuildMainCityPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/GuildMainCityPanel.lua @@ -305,8 +305,11 @@ function GuildMainCityPanel:OnShow() this.btnRedPacket:SetActive(false) end this.LiveName = "live2d_huyao" - this.LiveGO = poolManager:LoadLive(this.LiveName, this.btntranscriptLive.transform, + + if not this.LiveGO then + this.LiveGO = poolManager:LoadLive(this.LiveName, this.btntranscriptLive.transform, Vector3.one * 0.15, Vector3.New(0,0,0)) + end end @@ -586,8 +589,11 @@ function GuildMainCityPanel:OnDestroy() this.playerHead = nil - poolManager:UnLoadLive(this.LiveName,this.LiveGO ) - this.LiveName= nil + if this.LiveGO then + poolManager:UnLoadLive(this.LiveName,this.LiveGO) + this.LiveName = nil + this.LiveGO = nil + end end return GuildMainCityPanel \ No newline at end of file