Documentation‎ > ‎

9. Messenger

The messenger component allows all scripting languages to use TargetPRO by exposing events as Unity messages. C# users should still use delegates for maximum performance.

To use:
  1. Add this component
  2. Set the "For Component" to display the events available.
  3. Choose the events you want to use
  4. In a script, simply create a function of the same name as the message and it will be triggered.
This section will familiarize you with the Editor interface and options so you can get started right away. More detail on scripting the messages can be found in the Messenger Code Reference section


Other Message Target
An optional GameObject to send the message to instead of this component's GameObject.
For Component
The component this messenger will register event delegates with. In other words, the component you want this messenger to use.
Message Mode
Send or Broadcast. Send will be received by the target GameObject only. Broadcast includes the target's children. See the Unity documentation for more information.

Debug Level
Set this to control the amount of information printed to the Unity Console to aid development. Only Off and Normal are used for this component.