Esempio n. 1
0
        FixedList <AssetBundleRecord> GetNecessaryAssetBundleRecords(AssetEntryRecord assetEntryRecord)
        {
            var necessaryAssetBundleRecords = new List <AssetBundleRecord>();

            if (assetEntryRecord == null)
            {
                return(new FixedList <AssetBundleRecord>(necessaryAssetBundleRecords));
            }

            string            assetBundleName   = assetEntryRecord.AssetBundleName;
            AssetBundleRecord assetBundleRecord = this.AssetBundleRecordMap.Get(assetBundleName);

            if (assetBundleRecord == null)
            {
                return(new FixedList <AssetBundleRecord>(necessaryAssetBundleRecords));
            }

            temporaryHashSet.Add(assetBundleName);
            GetNecessaryAssetBundleRecords(
                assetBundleName,
                ref temporaryHashSet,
                ref necessaryAssetBundleRecords);

            temporaryHashSet.Clear();
            return(new FixedList <AssetBundleRecord>(necessaryAssetBundleRecords));
        }
Esempio n. 2
0
        public FixedList <AssetBundleRecord> GetNecessaryAssetBundleRecords(string assetEntryKey)
        {
            FixedList <AssetBundleRecord> cache;

            if (necessaryAssetBundleRecordsDictionary.TryGetValue(assetEntryKey, out cache))
            {
                return(cache);
            }

            AssetEntryRecord assetEntryRecord = this.AssetEntryRecordMap.Get(assetEntryKey);
            var result = GetNecessaryAssetBundleRecords(assetEntryRecord);

            necessaryAssetBundleRecordsDictionary.Add(assetEntryKey, result);

            return(result);
        }