I have a controller where i have a animation state. I want to play that animation clip from specified frame to specifed end frame. is this possible?

here is the snap shot of the controller enter image description here currently i am simply switching tow application using bool. I want to transition to paritcualr state but want to play its particular frame or time duration as a clip.

public Animator talkingAvatarAnimator;
    public bool isPlayHandGesture;

    void Update () {
        talkingAvatarAnimator.SetBool("isPlayHandGesture", isPlayHandGesture);

  • \$\begingroup\$ You want to alternate between 2 animations mid-play or something else? \$\endgroup\$
    – Nikaas
    Nov 2 '17 at 7:31
  • \$\begingroup\$ I want to play my second state which is actually working correctly but i dont want to play it from beginnig to end. I want to play its specified frames from middle of the animation. \$\endgroup\$ Nov 2 '17 at 7:33
  • \$\begingroup\$ Depending on how you decide what the starting point should be you can try docs.unity3d.com/ScriptReference/Animator.Play (look at normalized time) or next link gamedev.stackexchange.com/questions/142206/… may be of help too (look my answer about blend trees). \$\endgroup\$
    – Nikaas
    Nov 2 '17 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.