diff --git a/Assets/Mirror/Components/NetworkMatchChecker.cs b/Assets/Mirror/Components/NetworkMatchChecker.cs index 6aa459cbf..dc91fc083 100644 --- a/Assets/Mirror/Components/NetworkMatchChecker.cs +++ b/Assets/Mirror/Components/NetworkMatchChecker.cs @@ -83,6 +83,14 @@ public override void OnStartServer() // identity.RebuildObservers is called right after this from NetworkServer.SpawnObject } + public override void OnStopServer() + { + if (currentMatch == Guid.Empty) return; + + if (matchPlayers.ContainsKey(currentMatch) && matchPlayers[currentMatch].Remove(netIdentity)) + RebuildMatchObservers(currentMatch); + } + void RebuildMatchObservers(Guid specificMatch) { foreach (NetworkIdentity networkIdentity in matchPlayers[specificMatch])