From 0beb2547f0f16da7c53d369c21e99b8a6b0aebc4 Mon Sep 17 00:00:00 2001 From: Tomasz Piowczyk Date: Sat, 10 Sep 2022 10:55:41 +0200 Subject: [PATCH] Remove if check from OnBeforeSerialization --- Runtime/UDictionary.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Runtime/UDictionary.cs b/Runtime/UDictionary.cs index 54cb060..e16962f 100644 --- a/Runtime/UDictionary.cs +++ b/Runtime/UDictionary.cs @@ -139,11 +139,8 @@ public TValue this[TKey key] void ISerializationCallbackReceiver.OnBeforeSerialize() { - if (m_keys == null) - { - m_keys = Keys.ToArray(); - m_values = Values.ToArray(); - } + m_keys = Keys.ToArray(); + m_values = Values.ToArray(); } void ISerializationCallbackReceiver.OnAfterDeserialize()