diff --git a/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroInfoPanel.lua index e98849e93a..406d1708e9 100644 --- a/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroInfoPanel.lua @@ -323,6 +323,8 @@ end --根据界面数据加载动态立绘 function HandBookHeroInfoPanel:LoadHerolive(_heroData, _objPoint) --TODO:动态加载立绘 + local icon = GetResourcePath(_heroData.Live) + LogGreen("icon:"..icon) local testLive = poolManager:LoadLive(GetResourcePath(_heroData.Live), _objPoint.transform, Vector3.one * _heroData.Scale, Vector3.New(_heroData.Position[1], _heroData.Position[2], 0)) local SkeletonGraphic = testLive:GetComponent("SkeletonGraphic") @@ -443,6 +445,9 @@ end --界面关闭时调用(用于子类重写) function HandBookHeroInfoPanel:OnClose() + for k,v in pairs(this.PageList) do + v:OnHide() + end if this.leftLiveObj then poolManager:UnLoadLive(GetResourcePath(leftHeroData.Live), this.leftLiveObj) this.leftLiveObj = nil @@ -460,9 +465,6 @@ function HandBookHeroInfoPanel:OnClose() Util.ClearChild(this.curObj.transform) Util.ClearChild(this.leftObj.transform) Util.ClearChild(this.rightObj.transform) - for k,v in pairs(this.PageList) do - v:OnHide() - end end --界面销毁时调用(用于子类重写)