public void ReleaseAsset(string name, UnityEngine.Object obj) { for (int i = 0; i < mListComponent.Count; i++) { ResTypeGroup group = mListComponent[i] as ResTypeGroup; if (group == null) { continue; } if (group.ReleaseAssetReference(name, obj)) { return; } } if (obj is GameObject) { UnityEngine.Object.Destroy(obj); } #if !UNITY_EDITOR else { UnityEngine.Resources.UnloadAsset(obj); } #endif }
public void SetAssetReleasePriority(string name, int _Priority, UnityEngine.Object obj) { for (int i = 0; i < mListComponent.Count; i++) { ResTypeGroup group = mListComponent[i] as ResTypeGroup; if (group == null) { continue; } group.SetAssetReleasePriority(name, _Priority, obj); } }