Search Unity

How to get the current animator transition name and/or time?

Discussion in 'Animation' started by lacas8282, Sep 6, 2021.

  1. lacas8282

    lacas8282

    Joined:
    Apr 25, 2015
    Posts:
    139
    How to get the current animator transition name and/or time?

    I want this:

    Grounded->GroundedWithGun transition name (between the two states)

    And a time attribute, like 0.5, 1.0 is the transition end.

    Thanks
     
  2. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    599
    Hey,

    Animator.GetAnimatorTransitionInfo(0).IsName()

    Animator.GetAnimatorTransitionInfo(0).normalizedTime