Esempio n. 1
0
        /// <summary>
        /// Loads all files from the source immediately.  For editor tooling.
        /// </summary>
        public void LoadFromSourceImmediately(ConfigSource source)
        {
            Config.Assert(Platform.Instance.CanDoImmediatePreload, "Trying to load immediately on a platform that doesn't support it");
            m_isPreloading = true;
            Config.Log(LogVerbosity.Info, "Immediate-loading " + source);

            source.Preload(() => {});  // assume that this is immediate
            var files = source.GetFiles();

            foreach (var finfo in files)
            {
                m_configFiles.Add(finfo.Name);
                m_loadedFiles.Add(finfo.Name, finfo);
            }

            m_isPreloading = false;
            m_isPreloaded  = true;
        }