diff --git a/Assets/Mirror/Runtime/NetworkIdentity.cs b/Assets/Mirror/Runtime/NetworkIdentity.cs index f513ca3a0..12e74faee 100644 --- a/Assets/Mirror/Runtime/NetworkIdentity.cs +++ b/Assets/Mirror/Runtime/NetworkIdentity.cs @@ -1251,6 +1251,9 @@ internal void ClearAllComponentsDirtyBits() // Clear only dirty component's dirty bits. ignores components which // may be dirty but not ready to be synced yet (because of syncInterval) + // + // IMPORTANT to clear SyncLists's changes to avoid ever + // growing changes while not having observers etc. internal void ClearDirtyComponentsDirtyBits() { foreach (NetworkBehaviour comp in NetworkBehaviours) diff --git a/Assets/Mirror/Runtime/NetworkServer.cs b/Assets/Mirror/Runtime/NetworkServer.cs index ec0d20d3e..cdbdc4d1e 100644 --- a/Assets/Mirror/Runtime/NetworkServer.cs +++ b/Assets/Mirror/Runtime/NetworkServer.cs @@ -1598,13 +1598,16 @@ static void BroadcastToConnection(NetworkConnectionToClient connection) } // clear dirty bits only for the components that we serialized - // DO NOT clean ALL component's dirty bits, because + // DO NOT clear ALL component's dirty bits, because // components can have different syncIntervals and we don't // want to reset dirty bits for the ones that were not // synced yet. // (we serialized only the IsDirty() components, or all of // them if initialState. clearing the dirty ones is enough.) // + // IMPORTANT to clear SyncLists's changes to avoid ever + // growing changes while not having observers etc. + // // NOTE: this is what we did before push->pull // broadcasting. let's keep doing this for // feature parity to not break anyone's project.