diff --git a/Assets/Mirror/Runtime/NetworkIdentity.cs b/Assets/Mirror/Runtime/NetworkIdentity.cs index 0ac092cad..fe3c5726f 100644 --- a/Assets/Mirror/Runtime/NetworkIdentity.cs +++ b/Assets/Mirror/Runtime/NetworkIdentity.cs @@ -810,9 +810,8 @@ public void RebuildObservers(bool initialize) // none of the behaviours rebuilt our observers, use built-in rebuild method if (initialize) { - foreach (KeyValuePair kvp in NetworkServer.connections) + foreach (NetworkConnection conn in NetworkServer.connections.Values) { - NetworkConnection conn = kvp.Value; if (conn.isReady) AddObserver(conn); }