From fcf0557f014deb0f89fb3c57c0f30af271570bb2 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Wed, 26 Aug 2020 17:58:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=AC=E4=BC=9Aboss?= =?UTF-8?q?=E7=AB=8B=E7=BB=98=E4=BC=9A=E5=88=9B=E5=BB=BA=E5=A4=9A=E6=AC=A1?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Guild/GuildMainCityPanel.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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