コード例 #1
0
        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
        }
コード例 #2
0
 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);
     }
 }