Updating Netcode for Gameobjects to 2.1.1 broke my disconnect system

Hello everyone,

I was using Netcode for GameObjects version 1.5.2, and I implemented a disconnect system using NetworkManager.Singleton.OnClientDisconnectCallback. Essentially, I managed host disconnections through a separate GameObject in the scene, while client disconnections were handled via the “Default Player Prefab” spawned with the NetworkManager. This setup was working fine.

However, after updating Netcode for GameObjects to version 2.1.1, the system stopped working as intended. I didn’t change anything besides updating the Netcode for GameObjects.

Does anyone have any ideas on what might be causing this? As mentioned, the system was functioning correctly prior to the update.

Well there’s some info missing. Like, for instance, the actual code and the definition for “not working”. :wink:

Also consider that there’s a possibility that what you implemented was only working coincidentally but was never supposed to work that way.

I would need to see your disconnect system to be able to provide you with guidance as to why it might no longer work as expected (or as it worked back in v1.5.2 which is a bit of an older version relative to v1.11.0 and v2.1.1).

Without some form of replication project, I would say you might take a look at this v2 NGO example.

Specifically the ExtendedNetworkManager class and how it handles connect and disconnect events.

Let me know if that helps?