Пример #1
0
    /// <summary>
    /// Searches all layers of Animator of this GameObject does any of them at a specified state name?
    /// Specify layerIndex to look in only one layer.
    /// If you just issue a SetTrigger to change state for example, one frame is required to make it take effect.
    /// </summary>
    public static bool AnimatorAtState(this Component go, string stateName, int layerIndex = -1)
    {
        Animator ani = go.GetComponent <Animator>();

        return(ani.AtState(stateName, layerIndex));
    }