【对象池】偶现回收出现空物体,导致报错的问题
parent
77955d6f9c
commit
d48b6fc988
|
@ -202,9 +202,8 @@ function PoolManager:UnLoadAsset(resName,res, assetType)
|
|||
-- and assetType ~= PoolManager.AssetType.MediaUI
|
||||
--then
|
||||
if assetType == PoolManager.AssetType.GameObject
|
||||
and res ~= nil
|
||||
and res.transform ~= nil
|
||||
then
|
||||
and res
|
||||
and tostring(res) ~= "null" then
|
||||
res.transform:SetParent(self.mPoolTrans)
|
||||
if #pool.resList <= 5 then
|
||||
table.insert(pool.resList,res)
|
||||
|
|
Loading…
Reference in New Issue