Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Mechanim / animator explain condition for current state

Discussion in 'Animation' started by twda, Aug 12, 2017.

  1. twda

    twda

    Joined:
    Oct 25, 2012
    Posts:
    111
    I would like to ask if there is any way to have the animator tell me which condition are currently met so that I can immediately see why a certain animation state is current active.

    In the below image you can see that I switch between animation state according to conditions.
    Having only like 5 different conditions to deal with, I'm already confused why something happens, and I would like to know if there's any easy way to debug it.

    For example, it would be amazing if there'd be a callback like

    OnAnimatorStateChanged (string ReasonForSwitch)
    {
    }

    Does something like that exist?

    Thank you.

     
  2. twda

    twda

    Joined:
    Oct 25, 2012
    Posts:
    111
    I was so stupid. I could simply watch the animator during my game play...