[This is preliminary documentation and is subject to change.]
Subscribe to messages with the given message key and type
Namespace: (Default Namespace)Assembly: DH.Messaging.Extensions (in DH.Messaging.Extensions.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
Parameters
- messageKey
- Type: System String
Unique message identification key
Type Parameters
- T
- The type of message expected
Remarks
Examples
var subscriber = gameObject.CreateSubscriber(); subscriber.Subscribe<Vector3>("PointOfInterest");
Using this type of example you could, for instance, make a crowd of characters react to an explosion but sending a message of type Vector3 and a key of "PointOfInterest" to the MessageBusManager and receiving it with all characters that are subscribed.
See Also