Exemplo n.º 1
0
        /// <summary>
        /// 检测当前AssetBundle 资源中是否包含指定的资源
        /// </summary>
        /// <param name="folderAssetBundleKey"></param>
        /// <param name="fileName"></param>
        /// <returns></returns>
        public bool CheckIfContainAsset(string folderAssetBundleKey, string fileName)
        {
            AssetBundleAssetInfor assetBundleInfor = null;

            if (m_AllAssetBundleDataRecordDic.TryGetValue(folderAssetBundleKey, out assetBundleInfor))
            {
                if (assetBundleInfor.ContainAsset.Contains(fileName))
                {
                    return(true);
                }
                return(false);
            }
            return(false);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 记录当前文件件包含的AssetBundle
 /// </summary>
 /// <param name="allContainAsset"></param>
 public void RecordFolderAssetBundleContainAsset(string folderAssetBundleKey, IEnumerable <string> allContainAsset)
 {
     if (m_AllAssetBundleDataRecordDic.ContainsKey(folderAssetBundleKey) == false)
     {
         Debug.LogError("RecordFolderAssetBundleContainAsset  Fail,Not Exit " + folderAssetBundleKey);
         return;
     }
     if (m_AllAssetBundleDataRecordDic[folderAssetBundleKey].IsInitialed)
     {
         return;
     }
     m_AllAssetBundleDataRecordDic[folderAssetBundleKey].IsInitialed = true;
     foreach (var item in allContainAsset)
     {
         m_AllAssetBundleDataRecordDic[folderAssetBundleKey] = new AssetBundleAssetInfor();
     }
 }