Everything is in the title.
The Editor.serializedObject property is not working when following the example provided in the Editor documentation.
The changes in the inspector fields are not applied.
private SerializedProperty _propertyA;
private SerializedProperty _propertyB;
private SerializedProperty _propertyC;
public void OnEnable()
{
_propertyA = serializedObject.FindProperty("_A");
_propertyB = serializedObject.FindProperty("_B");
_propertyC = serializedObject.FindProperty("_C");
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(_propertyA, new GUIContent("A"));
EditorGUILayout.PropertyField(_propertyB, new GUIContent("B"));
EditorGUILayout.PropertyField(_propertyC, new GUIContent("C"));
serializedObject.ApplyModifiedProperties();
}
Anybody knows why ?
Thanks a lot !