private AssetBundleManager(byte[] assetDependencesBytes) { m_AssetDependences = new AssetDependencesParser().ParseAssetDependences(assetDependencesBytes); m_AssetCachePool = new AssetCachePool(); m_AssetBundleCollector = new AssetBundleCollector(m_AssetDependences); m_AssetRecycleBin = new AssetBundleRecycleBin(m_AssetBundleCollector); m_AssetCachePool.RegisterRecycleAssetEvent(m_AssetRecycleBin.RecycleAsset); m_AssetCachePool.RegisterCheckAssetDoneEvent(m_AssetRecycleBin.UnloadUnuesdAssets); m_AssetLoader = new AssetBundleLoader(m_AssetDependences, m_AssetBundleCollector); m_AssetLoader.RegisterAssetLoadDoneEvent(AddAssetToCachePool); m_AssetLoadOrder = new List <string>(); m_AssetLoadUniqueSet = new HashSet <string>(); }
public AssetBundleLoader(Dictionary <string, AssetInfo> dependences, AssetBundleCollector assetBundleCollector) { var priorityEnum = System.Enum.GetValues(typeof(AssetLoadPriority)); m_AssetLoadList = new List <AssetLoadList>(priorityEnum.Length); for (int i = 0; i < priorityEnum.Length; ++i) { m_AssetLoadList.Add(new AssetLoadList()); } m_AssetDependences = dependences; m_AssetLoadOrder = new List <string>(); m_AssetLoadUniqueSet = new HashSet <string>(); m_AssetAsyncLoadOrder = new List <string>(); m_AssetAsyncLoadUniqueSet = new HashSet <string>(); m_AssetBundleCollector = assetBundleCollector; }
public AssetBundleRecycleBin(AssetBundleCollector assetBundleCollector) { m_AssetBundleCollector = assetBundleCollector; }