diff --git a/Assets/Mirror/Core/SyncDictionary.cs b/Assets/Mirror/Core/SyncDictionary.cs index f0f052156..f12492e34 100644 --- a/Assets/Mirror/Core/SyncDictionary.cs +++ b/Assets/Mirror/Core/SyncDictionary.cs @@ -18,7 +18,8 @@ public enum Operation : byte OP_ADD, OP_CLEAR, OP_REMOVE, - OP_SET + OP_SET, + OP_RENEW } struct Change @@ -128,6 +129,8 @@ public override void OnSerializeDelta(NetworkWriter writer) break; case Operation.OP_CLEAR: break; + case Operation.OP_RENEW: + break; } } } @@ -151,6 +154,9 @@ public override void OnDeserializeAll(NetworkReader reader) // the next time the list is synchronized // because they have already been applied changesAhead = (int)reader.ReadUInt(); + + //Call OP_RENEW when all items have been changed. + AddOperation(Operation.OP_RENEW, default, default, false); } public override void OnDeserializeDelta(NetworkReader reader)