- Home /
Animation Editor Window – Get Active Clip Info
Hi all, does anyone know if there's a way to access the Animation Editor Window's fields? (See attached photo for info one which window I'm referring to). I'm trying to programmatically add keyframes to an animation based on the state of the Animation Editor Window. Specifically, I need access to
The current animation clip selected in the animation window
Which frame in the animation is selected in the animation window
Thank you for any help :)
Answer by JamesKaret · Jan 07, 2021 at 09:17 AM
I was doing super strange stuff to solve same question (but about getting current frame) and I've found the answer for myself.
https://answers.unity.com/questions/1802448/how-can-i-get-current-frame-of-animation-clip-on-a.html
however, I am not sure the meaning of "Which frame in animation window". Does it mean "current frame"?
if it's so, the link above would help.
getting current animation clip is also same. change "currentFrame" into "activeAnimationClip".
don't forget to swap value type as AnimationClip instead of int or float.
Your answer
Follow this Question
Related Questions
How to edit Animation Clip Settings using an editor script 2 Answers
How to refresh timeline after update to AnimationClip 1 Answer
Add Keyframe Via Script/Hotkey 1 Answer
EDITOR: How to Change Animation Curve Colors 0 Answers
How to get reference on current sample from animation window in editor 0 Answers