Ejemplo n.º 1
0
        internal override void Shutdown()
        {
            if (m_ResourceIniter != null)
            {
                m_ResourceIniter.Shutdown();
                m_ResourceIniter = null;
            }

            m_VersionListProcessor.VersionListUpdateSuccess -= OnVersionListProcessorUpdateSuccess;
            m_VersionListProcessor.Shutdown();
            m_VersionListProcessor = null;

            m_ResourceChecker.ResourceNeedUpdate -= OnCheckerResourceNeedUpdate;
            m_resourceChecker.Shutdown();
            m_ResourceChecker = null;

            m_ResourceUpdater.ResourceUpdateStart -= OnUpdateResourceUpdateStart;
            m_ResourceUpdater.ResourceUpdateAllComplete -= OnUpdateResourceUpdateAllComplete;
            m_ResourceUpdater.Shutdown();
            m_ResourceUpdater = null;

            m_ResourceLoader.Shutdown();
            m_ResourceLoader = null;

            m_AssetInfos.Clear();
            m_AssetDependencyInfos.Clear();
            m_ResourceInfos.Clear();
            m_ReadWriteResourceInfos.Clear();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 关闭并清理资源管理器。
        /// </summary>
        internal override void Shutdown()
        {
            if (m_ResourceIniter != null)
            {
                m_ResourceIniter.Shutdown();
                m_ResourceIniter = null;
            }

            if (m_ResourceLoader != null)
            {
                m_ResourceLoader.Shutdown();
                m_ResourceLoader = null;
            }

            m_AssetInfos.Clear();
            m_AssetDependencyInfos.Clear();
            m_ResourceInfos.Clear();
            m_ResourceGroups.Clear();
            m_ReadWriteResourceInfos.Clear();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 关闭并清理资源管理器。
        /// </summary>
        internal override void Shutdown()
        {
            if (m_ResourceIniter != null)
            {
                m_ResourceIniter.Shutdown();
                m_ResourceIniter = null;
            }

            if (m_VersionListProcessor != null)
            {
                m_VersionListProcessor.VersionListUpdateSuccess -= OnVersionListProcessorUpdateSuccess;
                m_VersionListProcessor.VersionListUpdateFailure -= OnVersionListProcessorUpdateFailure;
                m_VersionListProcessor.Shutdown();
                m_VersionListProcessor = null;
            }

            if (m_ResourceChecker != null)
            {
                m_ResourceChecker.ResourceNeedUpdate    -= OnCheckerResourceNeedUpdate;
                m_ResourceChecker.ResourceCheckComplete -= OnCheckerResourceCheckComplete;
                m_ResourceChecker.Shutdown();
                m_ResourceChecker = null;
            }

            if (m_ResourceUpdater != null)
            {
                m_ResourceUpdater.ResourceUpdateStart       -= OnUpdaterResourceUpdateStart;
                m_ResourceUpdater.ResourceUpdateChanged     -= OnUpdaterResourceUpdateChanged;
                m_ResourceUpdater.ResourceUpdateSuccess     -= OnUpdaterResourceUpdateSuccess;
                m_ResourceUpdater.ResourceUpdateFailure     -= OnUpdaterResourceUpdateFailure;
                m_ResourceUpdater.ResourceUpdateAllComplete -= OnUpdaterResourceUpdateAllComplete;
                m_ResourceUpdater.Shutdown();
                m_ResourceUpdater = null;
                m_UpdateFileCache = null;
                if (m_DecompressCache != null)
                {
                    m_DecompressCache.Dispose();
                    m_DecompressCache = null;
                }
            }

            if (m_ResourceLoader != null)
            {
                m_ResourceLoader.Shutdown();
                m_ResourceLoader = null;
            }

            if (m_AssetInfos != null)
            {
                m_AssetInfos.Clear();
                m_AssetInfos = null;
            }

            if (m_ResourceInfos != null)
            {
                m_ResourceInfos.Clear();
                m_ResourceInfos = null;
            }

            m_ReadWriteResourceInfos.Clear();
        }