# RegisterConnection(UnityAction<int>)

> Registers a callback, executed when a new Player connects to the Editor.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Networking.PlayerConnection](/engine/6000.7/script-reference/unityeditor/networking/playerconnection.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public void RegisterConnection(UnityAction<int> callback)
```

### Parameters

**** (\[UnityAction\<int>]\(/engine/6000.7/script-reference/unityengine/events/unityaction)): Action called when a new Player connects, with the Player ID of the Player.
