public static void saveEditorPref(SerializedObject serializedObject, string prefix = PiXYZSettings.serializePrefix) { SerializedProperty serializedProperty = serializedObject.FindProperty(prefix); EditorPrefs.SetBool("PiXYZ.Orient", serializedProperty.FindPropertyRelative("orient").boolValue); EditorPrefs.SetBool("PiXYZ.MapUV", serializedProperty.FindPropertyRelative("mapUV").boolValue); EditorPrefs.SetFloat("PiXYZ.MapUV3dSize", serializedProperty.FindPropertyRelative("mapUV3dSize").floatValue); EditorPrefs.SetFloat("PiXYZ.ScaleFactor", serializedProperty.FindPropertyRelative("scaleFactor").floatValue); EditorPrefs.SetBool("PiXYZ.IsRightHanded", serializedProperty.FindPropertyRelative("isRightHanded").boolValue); EditorPrefs.SetBool("PiXYZ.IsZUp", serializedProperty.FindPropertyRelative("isZUp").boolValue); EditorPrefs.SetInt("PiXYZ.TreeProcess", serializedProperty.FindPropertyRelative("treeProcess").intValue); EditorPrefs.SetInt("PiXYZ.LODCurrentIndex", serializedProperty.FindPropertyRelative("lodCurrentIndex").intValue); EditorPrefs.SetBool("PiXYZ.UseLods", serializedProperty.FindPropertyRelative("useLods").boolValue); EditorPrefs.SetInt("PiXYZ.LODsMode", serializedProperty.FindPropertyRelative("lodsMode").intValue); EditorPrefs.SetInt("PiXYZ.LODSettingCount", serializedProperty.FindPropertyRelative("lodSettingCount").intValue); for (int i = 0; i < serializedProperty.FindPropertyRelative("lodSettingCount").intValue; ++i) { PiXYZLoDSettingsEditor.saveEditorPref(i, serializedObject, prefix + "." + PiXYZLODSettings.serializePrefix); } EditorPrefs.SetBool("PiXYZ.UseMergeFinalAssemblies", serializedProperty.FindPropertyRelative("useMergeFinalAssemblies").boolValue); EditorPrefs.SetBool("PiXYZ.SplitTo16BytesIndex", serializedProperty.FindPropertyRelative("splitTo16BytesIndex").boolValue); }