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.15k
stars
435
forks
source link
NetworkManager.DisconnectClient() is disconnecting both Client and Host. #3019
Upon calling NetworkManager.DisconnectClient(); it should only disconnect the specified ClientID and not the host.
OR indicate what is causing the Host to disconnect. I'm still trying to figure what exactly is configured incorrectly that is causing this issue. Advice/assistance appreciated!
Add any other context about the problem here. Logs, code snippets would be useful here but please also consider attaching a minimal Unity project that reproduces the issue.
Description
I’m trying to implement a function to Kick a player out of the Server, but upon adding this function to a button event:
Logs For Client Disconnect:
Logs For Host Disconnect which happens after the Client Disconnects above:
It kicks BOTH the Client with ID 1 and the Host with ID 0.
Reproduce Steps
Implement a button with the following:
Actual Outcome
It should only disconnect the specified ClientID.
Expected Outcome
Upon calling NetworkManager.DisconnectClient(); it should only disconnect the specified ClientID and not the host. OR indicate what is causing the Host to disconnect. I'm still trying to figure what exactly is configured incorrectly that is causing this issue. Advice/assistance appreciated!
Screenshots
Environment
Additional Context
Add any other context about the problem here. Logs, code snippets would be useful here but please also consider attaching a minimal Unity project that reproduces the issue.