- Home /
Question by
supermarten · Feb 22, 2021 at 09:00 AM ·
animationeditor-scriptinganimation view
How to get the current time from the Animation View?
I have an editor script that duplicates animation events in the Animation View editor. However, I would like to place the duplicated event into the clip at the time currently shown in the Animation View. Is it possible to get the time the wiper is currently at in the Animation View in the editor?
Comment
Best Answer
Answer by supermarten · Dec 16, 2021 at 07:46 AM
UnityEditor.EditorWindow.GetWindow<AnimationWindow>().time;
https://docs.unity3d.com/2020.2/Documentation/ScriptReference/AnimationWindow-time.html