I’m trying to make my own editor so I can rotate object around some point directly on scene view using my own handler… It’s working fine on the scene view but somehow when I try to record it in animation, the rotation change isn’t recorded… when I checked, the value on inspector changes as I rotate using my handler…
I try to rotate it using it’s default handler, it’s recorded… but then I used my handler again, the rotation value on animation window doesn’t change… here’s my screenshot

I tried several method and then I noticed that OnValidate function is invoked when I change some attribute through inspector but isn’t invoked when I used my handler… So I think It’s probably because the changes on my object isn’t validated yet… anyone know how to validate object manually or anyone has any other idea what’s actually happening?
Well, does your editor use SerializedObject and if not do you use EditorUtility.SetDirty on your object after you changed it?
edit
Since the question got bumped again i had another look at the AnimationWindow code. It looks like the AnimationWindow uses the Undo system to record the changes. There is the “Undo.postprocessModifications” delegate to which the AnimationWindow subscribes to receive all changes that go through the Undo system. So make sure you register all your changes to the Undo system.
If you want to recreate the Transform inspector you might want to take a look how the original is implemented. For example if the rotation GUI got changed, the default TransformInspector executes this line:
Undo.RecordObjects(this.targets, "Inspector");
Which will record the state of the current selected objects. I’m not sure how or where it records the position / scale change since it uses “EditorGUILayout.PropertyField” which is complicated as hell :D. It’s also possible that Unity might perform this Undo registration through the SerializedObject when you call ApplyModifiedProperties(); at the end. ApplyModifiedProperties is implemented in native code, so we don’t know what happens there.
Though chances are high that you’re missing the ApplyModifiedProperties call at the end of your custom editor code which will actually “submit” the changes you made to the SerializedObject to the actual object.