Message Behaviour

Overview

This component creates Messages that are sent to the GameObject that holds the Animator that includes this behavior. This is very useful for enabling, disabling, or executing code while an animation is playing. It works exactly as Animations Events with the difference that animation events require a receiver, and it will throw a console error if the message does not get received. Messages Behaviours does not require a receiver and it will send messages On Enter, On Exit, or a specific time of the animation.

By default, it uses the IAnimatorListener Interface to filter the messages that are sent to specific scripts.

You can Enable the Option SendMessage() to use the Unity SendMessage option instead.

Parameters

Enter

Send messages using the On State Enter, to the Animator GameObject.

Exit

Send messages using the On State Exit, to the Animator GameObject.

Time

Send messages using the On State Update, at a specific time of the Animation, to the Animator GameObject.

Children

When enabled, it will send messages also to all the Animator gameobject children.

SendMessage()

When enabled, it will use the Unity SendMessage method instead of the IAnimatorListener Interface.

Debug

Debug the Message behavior in the Console.

Message

The different messages On Enter, On Exit, and On Time, will be sent. The different types of messages supported are:

Last updated