Search Unity

Question How do you reference this Mecanim animation state "Idle" programmatically?

Discussion in 'Animation' started by marzilladev, Feb 7, 2023.

  1. marzilladev

    marzilladev

    Joined:
    Dec 10, 2021
    Posts:
    13
    How do you check for the name of the current animation state? My research indicates it is actually called a layer. Sure enough, while debugging in VS, I was able to drill down all the way to it. But I'm having a hard time finding the exact path to this Idle state (circled in yellow) in order to reference it in code. Please see attached.
     

    Attached Files:

  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,565
    marzilladev likes this.