MLAPI API Reference

# NetworkedBehaviour
RegisterMessageHandler Method

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

Registers a message handler

Namespace: MLAPI.MonoBehaviours.Core
Assembly: MLAPI (in MLAPI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
Copy

    protected int RegisterMessageHandler(
    	string name,
    	Action<uint, byte[]> action
    )

Request Example
View Source

#### Parameters

name
  Type: System
  String
  The MessageType to register
action
  Type: System
  Action
  UInt32,
  Byte
  The callback to get invoked whenever a message is received

#### Return Value

Type: Int32
HandlerId for the messageHandler that can be used to deregister the messageHandler
See Also

#### Reference

NetworkedBehaviour Class
MLAPI.MonoBehaviours.Core Namespace