Search Unity

Animator Tags

Discussion in 'Scripting' started by artistshc, May 10, 2015.

  1. artistshc

    artistshc

    Joined:
    Mar 7, 2015
    Posts:
    79
    Hi. I can't really find any helpful info about using the tag info in the animator. I want to just simply access the tag (in this case the tag is closed) and then do something if the tag is closed. Thank you!

    Code (CSharp):
    1. if (AnimatorStateInfo.IsTag ("Closed")) {
    2.             //do something here
    3.             Debug.Log ("closed");
    4.         }
     
  2. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
  3. artistshc

    artistshc

    Joined:
    Mar 7, 2015
    Posts:
    79
    Thank you...I still do not understand though. I already went to that docs page before I asked the question. Can you please give me an example on how I would use the tag. I want to be able to access the tag name somehow.
    Thank you in advance.
    Rachel
     

    Attached Files: