示例#1
0
    protected void UnloadAssetBundleInternal(string assetBundleName, bool unload)
    {
        string            error;
        LoadedAssetBundle bundle = GetLoadedAssetBundle(assetBundleName, out error);

        if (bundle == null)
        {
            return;
        }

        if (--bundle.m_ReferencedCount == 0)
        {
            bundle.OnUnload(unload);
            m_LoadedAssetBundles.Remove(assetBundleName);
#if UNITY_EDITOR
            //Debug.Log(assetBundleName + " has been unloaded successfully ");
#endif
        }
    }