Example #1
0
        void Save()
        {
            var cfg = new ConfigNode("LOD_CONFIG");

            var thumb = cfg.AddNode("Thumbnail");

            thumb.AddValue("Enabled", ThumbnailEnabled.ToString());
            thumb.AddValue("Width", ThumbnailWidth.ToString());
            thumb.AddValue("Height", ThumbnailHeight.ToString());
            thumb.AddValue("Format", ThumbnailFormat.ToString());

            var ui = cfg.AddNode("ActivityInterface");

            ui.AddValue("SecondsBeforeShowing", UI_DelayBeforeShowingActivityUI.TotalSeconds.ToInt().ToString());
            ui.AddValue("SecondsBeforeHiding", UI_DelayBeforeHidingActivityUI.TotalSeconds.ToInt().ToString());

            cfg.AddValue("TryUseToolbarForDebugUI", UI_TryUseToolbarForDebugUI.ToString());
            cfg.AddValue("ShowDebugUI", UI_DisplayDebugUI.ToString());
            cfg.AddValue("DontLoadEditorCatalogParts", Debug_DontLoadEditorCatalogThumbnailParts.ToString());

            cfg.AddValue("CompressTextures", CompressTextures.ToString());


            var cache = cfg.AddNode("Cache");

            foreach (var el in CachedDataPerResUrl)
            {
                cache.AddNode(el.Value.ToConfigNode());
            }

            cfg.Save(cfgFileLocation.FullName);
            IsDirty = false;
        }
Example #2
0
        void Save()
        {
            var cfg = new ConfigNode("LOD_CONFIG");

            var ui = cfg.AddNode("ActivityInterface");

            ui.AddValue("SecondsBeforeShowing", UI_DelayBeforeShowingActivityUI.TotalSeconds.ToInt().ToString());
            ui.AddValue("SecondsBeforeHiding", UI_DelayBeforeHidingActivityUI.TotalSeconds.ToInt().ToString());

            cfg.AddValue("TryUseToolbarForDebugUI", UI_TryUseToolbarForDebugUI.ToString());
            cfg.AddValue("ShowDebugUI", UI_DisplayDebugUI.ToString());
            cfg.AddValue("DontLoadEditorCatalogParts", Debug_DontLoadEditorCatalogThumbnailParts.ToString());

            DefaultImageSettings.WriteToConfigNode(cfg.AddNode("DefaultImageConfig"));

            var cache = cfg.AddNode("Cache");

            foreach (var el in CachedDataPerResUrl)
            {
                cache.AddNode(el.Value.ToConfigNode());
            }

            cfg.Save(cfgFileLocation.FullName);
            IsDirty = false;
        }