/// <summary> /// apply the settings of the saved EditorPref /// </summary> private void ApplySaveSettings() { string keyRect = EditorPrefs.GetString(_keyEditorPref); _saveEditorPreference = GetFromJsonDatasEditorPref(keyRect); _windowMenu = new Rect(_saveEditorPreference.Position.x, _saveEditorPreference.Position.y, _windowMenu.width, _windowMenu.height); _isMinimised = _saveEditorPreference.Minimised; if (!IsMinimisable) { IsMinimisable = false; } }
public SaveEditorPref GetFromJsonDatasEditorPref(string json) { _saveEditorPreference = JsonUtility.FromJson <SaveEditorPref>(json); return(_saveEditorPreference); }