diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua index 4b0b027e56..0434ea3695 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua @@ -231,6 +231,10 @@ function this.RefreshPlayerInfo(data) -- sortingorder = this.sortingOrder -- end LogError("title=="..title) + if titleLive then + SubUIManager.Close(titleLive) + titleLive = nil + end if not titleLive then titleLive = SubUIManager.Open(SubUIConfig.PlayerTitle, this.titlePar.transform) titleLive:SetShow(title, Vector3.New(0,0,0), 0.5, 0.03*20, this.sortingOrder) @@ -464,6 +468,10 @@ end --界面关闭时调用(用于子类重写) function PlayerInfoPopup:OnClose() this.imprintObj:SetActive(false) + if titleLive then + SubUIManager.Close(titleLive) + titleLive = nil + end end --界面销毁时调用(用于子类重写)