Search Unity

GetComponent Of An Animator State?

Discussion in 'Scripting' started by blqckdeath, Dec 10, 2018.

  1. blqckdeath

    blqckdeath

    Joined:
    Nov 5, 2018
    Posts:
    5
    Hi! I want to get another script StateMachineBehaviour from another StateMachineBehaviour script that is placed on the same state as the first one.

    I didn't manage to do it by using the "AnimatorStateInfo" that is available in fuctions like:
    "public override void OnStateEnter(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex)"
    or
    "public override void OnStateUpdate(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex)"

    Is it possible to do it? By hash code or something?