- Home /
Custom Editor wIndow not being detected by the Animation window
I'm moving a gameobject using my custom Editor Window with this code:
" m_Transform.position = EditorGUILayout.Vector2Field("Position: ", m_Transform.position); "
But when I press the Record button in the Animation window, the movement doesn't get recorded or registered as a new keyframe.
Is there a way I can make my custom Editor Window get detected by the Animation window?
Answer by Bunny83 · Jun 22, 2018 at 08:09 AM
Use RecordObject before your change:
Undo.RecordObject(m_Transform, "Changed position");
m_Transform.position = EditorGUILayout.Vector2Field("Position: ", m_Transform.position);
Your answer
Follow this Question
Related Questions
How to make multiple selected Animation's Preview window as editor window 0 Answers
mouseposition and clicks in editor sceneview 0 Answers
Custom Editor - Is there any way to detect whether the user is in Prefab editing mode? 1 Answer
Set MinWidth for EditorWindow 1 Answer
Drawing a line in a EditorWIndow? 1 Answer