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 :slight_smile:

I was doing super strange stuff to solve same question (but about getting current frame) and I’ve found the answer for myself.

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.