class MAGES::ComponentLibrary::WaitForAnimatorState

Overview

Waits for the animator state to finish. More…

class WaitForAnimatorState: public MonoBehaviour
{
public:
    // properties

    UnityEvent OnStateStarted;
    UnityEvent OnStateUpdated;
    UnityEvent OnStateFinished;

    // methods

    WaitForAnimatorState SetAnimator(Animator specificAnimator = null);
    WaitForAnimatorState State(string animationState);
    WaitForAnimatorState LayerIndex(int layerIndex);
};

Detailed Documentation

Waits for the animator state to finish.

Properties

UnityEvent OnStateStarted

Gets the event that is triggered when the state is started.

UnityEvent OnStateUpdated

Gets the event that is triggered when the state is updated.

UnityEvent OnStateFinished

Gets the event that is triggered when the state is finished.

Methods

WaitForAnimatorState SetAnimator(Animator specificAnimator = null)

Sets the animator to wait for.

Parameters:

specificAnimator

The animator.

Returns:

Self.

WaitForAnimatorState State(string animationState)

Sets the state to wait for.

Parameters:

animationState

The animator state.

Returns:

Self.

WaitForAnimatorState LayerIndex(int layerIndex)

Sets the layer index to check for the animator.

Parameters:

layerIndex

The index.

Returns:

Self.