예제 #1
0
    /// <summary>
    /// 资源引用次数减一
    /// </summary>
    /// <param name="abPath"></param>
    /// <param name="assetName"></param>
    public void Release(string abPath, string assetName)
    {
        CMAssetBundle cmAB = null;

        if (m_dicAssetBundleDatas.TryGetValue(abPath, out cmAB) && cmAB.IsDone())
        {
            cmAB.ReleaseAsset(assetName);
        }
    }
예제 #2
0
    /// <summary>
    /// 移除资源引用计数
    /// </summary>
    /// <param name="assetName"></param>
    /// <param name="abPath"></param>
    public void RemoveAssetRef(string assetName, string abPath)
    {
        CMAssetBundle ab = null;

        if (!TryGetCMAssetBundle(abPath, out ab))
        {
            Debug.LogError(string.Format("CMAssetBundleLoaderMgr->RemoveAssetRef failed,CmassetBundle {0} not exit", abPath));
            return;
        }
        ab.ReleaseAsset(assetName);
    }