# RegisterMessageHandler(string, Action<int, byte[]>)

> Registers a handler to process all incoming messages on a specific channel.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.MPE](/engine/6000.0/script-reference/unityeditor/mpe.md)
* **Assembly:** UnityEditor

```csharp
public static Action RegisterMessageHandler(string channelName, Action<int, byte[]> handler)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the channel.**** (\[Action\<int, byte\[]>]\(https\://learn.microsoft.com/dotnet/api/system.action)): The handler that processes messages.

### Returns

| Type                                                           | Description                                                                                                                                                                                                               |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Action](https://learn.microsoft.com/dotnet/api/system.action) | An action that you can use to unregister the handler from message processing (see [ChannelService.UnregisterMessageHandler](/engine/6000.0/script-reference/unityeditor/mpe/channelservice/unregistermessagehandler.md)). |
