private ResourcesAssetManager() { m_AssetCachePool = new AssetCachePool(); m_AssetRecycleBin = new AssetRecycleBin(); m_AssetLoader = new ResourcesAssetLoader(); m_AssetCachePool.RegisterRecycleAssetEvent(m_AssetRecycleBin.RecycleAsset); m_AssetCachePool.RegisterCheckAssetDoneEvent(m_AssetRecycleBin.UnloadUnuesdAssets); m_AssetLoader.RegisterAssetLoadDoneEvent(AddAssetToCachePool); }
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>(); }