Search Issue Tracker
Fixed
Fixed in ngo-1.10.0
Votes
0
Found in [Package]
netcode-gameobjects-1.8.1
netcode-gameobjects-1.9.1
Issue ID
MTTB-135
Regression
No
[GH-2927] ConnectedClients.Count hasn't been updated" when OnClientDisconnectCallback is triggered
[https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/issues/2927]
h3. Description
I add listener functions for both OnClientConnectedCallback() and OnClientDisconnectCallback() to update client amount when clients connect or disconnect.
Inside OnClientConnectedCallback(), the NetworkManager.Singleton.ConnectedClients.Count is correct while it's wrong inside OnClientDisconnectCallback()
h3. Reproduce Steps
- Client: StartClient()
- Server: OnClientConnectedCallback() gets triggered, NetworkManager.Singleton.ConnectedClientsIds has proper amount of clients which is 1
- Client: Shutdown() or just close app
- Server: OnClientDisconnectCallback() gets triggered, NetworkManager.Singleton.ConnectedClientsIds has WRONG amount of clients which is still 1 rather than 0
h3. Environment
- OS: macOS Sonoma
- Unity Version: 2022.3.20
- Netcode Version: 1.8.1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shader Graph Swizzle Node Input/Output and Mask Update Incorrectly After Undo
- [URP] Crash on GameObject::QueryComponentByType when baking a Reflection Probe in an unsaved/untitled Scene
- No Icons are used for the Entry and Exit States in the Inspector when selected in an Animator Controller
- Crash on PlayerMain(int, char const**) when exiting Standalone Player with a Particle System in the Scene
- No Icon is used for the Runtime Animator Controller Type in a Search Window when assigning an Animator Controller in the Animator Component
Add comment