Example #1
0
    private static void ReleaseAssetWithAB(string path)
    {
        if (!ResourceRegulation.is_inwhite_common(path))
        {
            if (AssetManagerBase.mapAssets.ContainsKey(path))
            {
                AssetManagerBase.mapAssets.Remove(path);
            }
            if (AssetManagerBase.mapAssetsRef.ContainsKey(path))
            {
                AssetManagerBase.mapAssetsRef.Remove(path);
            }
        }
        if (!AssetManagerBase.mapAssetsToAssetBundleRef.ContainsKey(path))
        {
            return;
        }
        int num = AssetManagerBase.mapAssetsToAssetBundleRef.get_Item(path);

        AssetManagerBase.mapAssetsToAssetBundleRef.Remove(path);
        for (int i = 0; i < num; i++)
        {
            AssetLoader.UnloadAsset(path, null);
        }
    }
Example #2
0
 private static void ReleaseAsset(string path)
 {
     if (!ResourceRegulation.is_inwhite_common(path))
     {
         AssetManagerBase.mapAssets.Remove(path);
         AssetManagerBase.mapAssetsRef.set_Item(path, 0);
     }
 }