diff --git a/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs b/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs index 03076e657e..b0aab2b753 100644 --- a/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs @@ -903,6 +903,20 @@ private void HostServerInitialize() ConnectionManager.InvokeOnClientConnectedCallback(LocalClientId); } + /// + /// Get the transportId from the associated clientId. + /// + /// The ClientId to get the TransportId from + /// + public ulong GetTransportIdFromClientId(ulong clientId) => ConnectionManager.ClientIdToTransportId(clientId); + + /// + /// Get the clientId from the associated transportId. + /// + /// The TransportId to get the ClientId from + /// + public ulong GetClientIdFromTransportId(ulong transportId) => ConnectionManager.TransportIdToClientId(transportId); + /// /// Disconnects the remote client. ///