Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

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,582
    marzilladev likes this.