예제 #1
0
 public static void ReleaseAsset(string key)
 {
     if (!AssetPool.IsInStrongDict(key))
     {
         return;
     }
     AssetPool.Asset asset = AssetPool._strongAssetDict[key];
     asset.ReferenceCount--;
 }
예제 #2
0
 public static UnityEngine.Object GetAsset(string key)
 {
     if (AssetPool.IsInStrongDict(key))
     {
         AssetPool.Asset asset = AssetPool._strongAssetDict[key];
         asset.ReferenceCount++;
         return(asset.Object);
     }
     if (AssetPool.IsInWeakDict(key))
     {
         AssetPool.Asset asset2 = AssetPool._weakAssetDict[key];
         return(asset2.Object);
     }
     return(null);
 }
예제 #3
0
 public static bool HasAsset(string key)
 {
     return(AssetPool.IsInStrongDict(key) || AssetPool.IsInWeakDict(key));
 }