You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the host/client disconnects from the game server, the ID passed to NetworkManager.OnClientDisconnectedCallback on that Host/client is incorrect. When that same host/client connects using NetworkManager.OnClientConnectedCallback the id is correct and doesn't match the id when NetworkManager.OnClientDisconnectedCallback is called. If the client is not host everything works and ids are correct. Just the host/client has this issue. Screenshot below
Reproduce Steps
In code, provide a callback function for NetworkManager.Singleton.OnClientDisconnectedCallback on the client.
In that callback function, print to the console the values for the function parameter and NetworkManager.Singleton.LocalClientId
Start a server using NetworkManager.StartHost()
Note the id passed in NetworkManager.Singleton.OnClientConnectedCallback
Start a client using StartClient()
After both are connected, disconnect the host.
Observe the console log on the Host/client and note that the two values are different.
Actual Outcome
When the host disconnects the client id passed is incorrect. It doesn't match the client id passed when the host/client connects using
OnClientConnectedCallback.
Expected Outcome
The client id passed in OnClientConnectedCallback should match the value passed in OnClientDisconnectedCallback.
Screenshots
Environment
OS: Windows
Unity Version: 2022.3.16f1
Netcode Version: 1.7.1
The text was updated successfully, but these errors were encountered:
Description
When the host/client disconnects from the game server, the ID passed to NetworkManager.OnClientDisconnectedCallback on that Host/client is incorrect. When that same host/client connects using NetworkManager.OnClientConnectedCallback the id is correct and doesn't match the id when NetworkManager.OnClientDisconnectedCallback is called. If the client is not host everything works and ids are correct. Just the host/client has this issue.
Screenshot below
Reproduce Steps
Actual Outcome
When the host disconnects the client id passed is incorrect. It doesn't match the client id passed when the host/client connects using
OnClientConnectedCallback.
Expected Outcome
The client id passed in OnClientConnectedCallback should match the value passed in OnClientDisconnectedCallback.
Screenshots
Environment
The text was updated successfully, but these errors were encountered: