MessageBusGameObjectExtensions CreateSubscriber Method DH.Messaging Documentation

[This is preliminary documentation and is subject to change.]

Adds a MessageBusSubscriber component to the referenced GameObject

Namespace: (Default Namespace)
Assembly: DH.Messaging.Extensions (in DH.Messaging.Extensions.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public static MessageBusSubscriber CreateSubscriber(
	this GameObject gameObject
)

Parameters

gameObject
Type: GameObject
GameObject to attach subscriber to

Return Value

Type: MessageBusSubscriber
MessageBusSubscriber Component

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type GameObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see OnlineExtension Methods (Visual Basic) or OnlineExtension Methods (C# Programming Guide).
Remarks

If a MessageBusSubscriber component already exists, the existing component is returned
See Also