Quick answer: Unity prefab override applied via Apply All but the change reverts after closing the stage? Custom inspectors need to call RecordObject before setting properties.
Custom inspector modifies a private field via reflection. Save looks successful; reopening the prefab shows the original value.
Record with Undo
Undo.RecordObject(target, "Change foo");
property.SetValue(target, newVal);
EditorUtility.SetDirty(target);RecordObject puts the change in the undo stack and marks it as a real edit. Without it, the editor treats the change as transient.
Use SerializedProperty
Better: serializedObject.FindProperty("foo").intValue = x; serializedObject.ApplyModifiedProperties(). Handles undo and dirty automatically.
Verify in the Overrides dropdown
Prefab inspector shows overrides; modified field should appear. If not, the change wasn't tracked.
“Custom inspectors that bypass SerializedProperty bypass the editor's change tracking.”
Prefer SerializedProperty for all editor code. Reflection is faster to write; bugs eat all the savings.