Пример #1
0
    /// <summary>
    /// 释放资源包
    /// </summary>
    public void Dispose()
    {
        if (this.assetBundleLoader == null)
        {
            return;
        }

        assetBundleLoader.Dispose();
        assetBundleLoader = null;
    }
Пример #2
0
    /// <summary>
    /// 释放内存中的资源包
    /// </summary>
    public void Dispose()
    {
        if (m_ABloader == null)
        {
            return;
        }

        m_ABloader.Dispose();
        m_ABloader = null;
    }
    /// <summary>
    /// 释放资源包
    /// </summary>
    public void Dispose()
    {
        if (assetBundleLoader == null)
        {
            return;
        }

        assetBundleLoader.Dispose();
        // false : 只卸载包
        // true  : 卸载包和obj
        assetBundleLoader = null; //释放资源后, 把 assetBundleLoader 置空
    }
Пример #4
0
 /// <summary>
 /// AssetBundle异步加载完成
 /// </summary>
 public void LoadAssetBundleFinished(AssetBundleLoader loader, AssetBundle assetBundle)
 {
     if (assetBundle != null)
     {
         var unit = mAssetBundleUnitPool.Spawn();
         unit.AssetBundle = assetBundle;
         mAssetBundleUnitDict.Add(loader.AssetBundleName, unit);
     }
     mAssetBundleLoaderQueue.Remove(loader.AssetBundleName);
     loader.Dispose();
     mAssetBundleLoaderPool.Recycle(loader);
 }