public static void ReleaseAsset(string key) { if (!AssetPool.IsInStrongDict(key)) { return; } AssetPool.Asset asset = AssetPool._strongAssetDict[key]; asset.ReferenceCount--; }
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); }
public static bool HasAsset(string key) { return(AssetPool.IsInStrongDict(key) || AssetPool.IsInWeakDict(key)); }