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)); }
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); }