From f69bfc67738331d98af325ea0927cdc6b23d6523 Mon Sep 17 00:00:00 2001 From: Makihiro Date: Sun, 18 Feb 2024 02:35:23 +0900 Subject: [PATCH] optimize null check --- .../Editor/ManagedReferenceUtility.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/ManagedReferenceUtility.cs b/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/ManagedReferenceUtility.cs index 577efde..b071f71 100644 --- a/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/ManagedReferenceUtility.cs +++ b/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/ManagedReferenceUtility.cs @@ -12,7 +12,7 @@ namespace MackySoft.SerializeReferenceExtensions.Editor { #if UNITY_2021_3_OR_NEWER // NOTE: managedReferenceValue getter is available only in Unity 2021.3 or later. - if (property.managedReferenceValue != null && type != null) + if ((type != null) && (property.managedReferenceValue != null)) { // Restore an previous values from json. string json = JsonUtility.ToJson(property.managedReferenceValue);