【内存优化】添加一些debug打印
parent
e277760221
commit
31ad3358bc
|
@ -68,6 +68,7 @@ function this.Close(sub)
|
|||
sub:OnClose()
|
||||
end
|
||||
resMgr:UnLoadAsset(sub.assetName)
|
||||
LogError("sub UI close: "..sub.assetName)
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -719,6 +719,7 @@ function UIManager.DelayDestroyPanel(panel)
|
|||
end
|
||||
|
||||
function UIManager.DestroyPanel(panel)
|
||||
LogError("Panel Destroy: "..panel.uiConfig.assetName)
|
||||
panel:DestroyUI()
|
||||
GameObject.Destroy(panel.gameObject)
|
||||
resMgr:UnLoadAsset(panel.uiConfig.assetName)
|
||||
|
|
|
@ -32,6 +32,7 @@ end
|
|||
-- 根据界面加载的数量卸载相应数量的资源
|
||||
function SpriteLoader:UnLoadSprite()
|
||||
for name, count in pairs(self.SpriteList) do
|
||||
LogWarn("lua 回收资源:name:"..name..", count:"..count)
|
||||
resMgr:UnLoadAsset(name, count)
|
||||
end
|
||||
self.SpriteList = {}
|
||||
|
|
|
@ -149,6 +149,7 @@ function this:InitComponent()
|
|||
this.mopUpGo:SetActive(false)
|
||||
|
||||
--元素共鸣
|
||||
LogError("FormationPanelV2 Init")
|
||||
this.ElementalResonanceView = SubUIManager.Open(SubUIConfig.ElementalResonanceView, this.gameObject.transform)
|
||||
end
|
||||
|
||||
|
@ -261,6 +262,7 @@ function this:OnClose()
|
|||
end
|
||||
|
||||
function this:OnDestroy()
|
||||
LogError("FormationPanelV2 OnDestroy")
|
||||
this.spLoader:Destroy()
|
||||
SubUIManager.Close(this.UpView)
|
||||
SubUIManager.Close(this.ElementalResonanceView)
|
||||
|
|
|
@ -578,6 +578,7 @@ function this.Init()
|
|||
if not sr then
|
||||
sr = go.gameObject:AddComponent(typeof(UnityEngine.SpriteRenderer))
|
||||
end
|
||||
LogWarn("Lua Load map BG:".._mapConfig[_mapId].BGPath.."_"..count)
|
||||
sr.sprite = this.spLoader:LoadSprite(_mapConfig[_mapId].BGPath.."_"..count)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue