Unity-Technologies / com.unity.netcode.gameobjects

Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.
MIT License
2.16k stars 435 forks source link

Kicking a client as a host also kicks the host. #2805

Closed nitrocss closed 10 months ago

nitrocss commented 11 months ago

I host the game, join with a client. I then kick the client using:

NetworkManager.Singleton.DisconnectClient(otherClient.OwnerClientId);

The client gets disconnected, but so does the host. I used debugger, and it seems that host player gets despawned at

internal void OnClientDisconnectFromServer(ulong clientId).

I double-checked, and then triple-checked that I get the ownerclientid from networkobject of the client, not the host.

I am using latest version of NGO. Windows PC.

I appreciate any help.

nitrocss commented 10 months ago

It seems that this is linked to EOS transport layer implementation. Could not reproduce on Unity Transport.