Exemplo n.º 1
0
 private void SaveEditorSettings()
 {
     EditorPrefs.SetBool(CompleteUndoKey, registerCompleteObjectUndo);
     EditorPrefs.SetBool(ShowDatabaseNameKey, showDatabaseName);
     EditorPrefs.SetFloat(AutoBackupKey, autoBackupFrequency);
     EditorPrefs.SetString(AutoBackupFolderKey, autoBackupFolder);
     EditorPrefs.SetBool(AddNewNodesToRightKey, addNewNodesToRight);
     EditorPrefs.SetBool(TrimWhitespaceAroundPipesKey, trimWhitespaceAroundPipes);
     EditorPrefs.SetString(LocalizationLanguagesKey, JsonUtility.ToJson(localizationLanguages));
     EditorPrefs.SetString(SequencerDragDropCommandsKey, SequenceEditorTools.SaveDragDropCommands());
 }
Exemplo n.º 2
0
 private void LoadEditorSettings()
 {
     registerCompleteObjectUndo = EditorPrefs.GetBool(CompleteUndoKey, true);
     showDatabaseName           = EditorPrefs.GetBool(ShowDatabaseNameKey, true);
     autoBackupFrequency        = EditorPrefs.GetFloat(AutoBackupKey, DefaultAutoBackupFrequency);
     timeForNextAutoBackup      = Time.realtimeSinceStartup + autoBackupFrequency;
     addNewNodesToRight         = EditorPrefs.GetBool(AddNewNodesToRightKey, false);
     trimWhitespaceAroundPipes  = EditorPrefs.GetBool(TrimWhitespaceAroundPipesKey, true);
     if (EditorPrefs.HasKey(LocalizationLanguagesKey))
     {
         localizationLanguages = JsonUtility.FromJson <LocalizationLanguages>(EditorPrefs.GetString(LocalizationLanguagesKey));
     }
     if (EditorPrefs.HasKey(SequencerDragDropCommandsKey))
     {
         SequenceEditorTools.RestoreDragDropCommands(EditorPrefs.GetString(SequencerDragDropCommandsKey));
     }
 }