private void GetEditorConfig(string message, object callback)
        {
            string defaultJsonValue = "{}";
            string previousSetting  = EditorPrefs.GetString(Constants.UCE_SETTINGS_KEY);

            if (!string.IsNullOrEmpty(previousSetting))
            {
                defaultJsonValue = previousSetting;
                EditorPrefs.DeleteKey(Constants.UCE_SETTINGS_KEY);
            }

            GetOrCreateConfigPathInternal(message, callback, PathManager.GetEditorConfigPath(), defaultJsonValue);
        }
        public override void Run()
        {
            var savePath = EditorUtility.SaveFilePanel(
                "Export Settings",
                Utility.PathCombine(Application.dataPath, ".."),
                "setting",
                Constants.SETTING_FILE_EXT);

            if (string.IsNullOrEmpty(savePath))
            {
                return;
            }

            // editor config
            var           editorConfig     = "{}";
            var           editorConfigPath = PathManager.GetEditorConfigPath();
            StringBuilder sb = new StringBuilder();

            sb.Append("{");
            if (File.Exists(editorConfigPath))
            {
                editorConfig = File.ReadAllText(editorConfigPath);
                sb.Append(string.Format("\"editor\":{0},", editorConfig));
            }

            // key mapping
            var keymapping     = "{}";
            var keymappingPath = PathManager.GetKeyMappingConfigPath();

            if (File.Exists(keymappingPath))
            {
                keymapping = File.ReadAllText(keymappingPath);
                sb.Append(string.Format("\"keymap\":{0}", keymapping));
            }

            sb.Append("}");

            File.WriteAllText(savePath, sb.ToString());
        }
 private void SaveEditorConfig(string message, object callback)
 {
     SaveConfigFileInternal(message, callback, PathManager.GetEditorConfigPath());
 }