【资源】卸载资源时判断,如果loader没有卸载时,资源不再卸载
parent
3e3f5888d0
commit
057f899cad
|
@ -80,7 +80,17 @@ namespace ResMgr
|
|||
{
|
||||
if (Asset is GameObject)
|
||||
return;
|
||||
Resources.UnloadAsset(Asset);
|
||||
if (Loader.IsFree)
|
||||
{
|
||||
Resources.UnloadAsset(Asset);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(this.Name == "shadow_4")
|
||||
{
|
||||
Debug.LogWarning("resData Loader is not Free, not unLoad: " + this.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
Asset = null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue