From 1abb5d7e35ab5c227fb38ccbf098db40e1e8de8b Mon Sep 17 00:00:00 2001 From: chadefranklin Date: Mon, 28 Mar 2022 20:46:01 -0400 Subject: [PATCH] Assign result Fixed bug where clicking on type selection button the first time leads to error. --- .../Editor/SubclassSelectorDrawer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/SubclassSelectorDrawer.cs b/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/SubclassSelectorDrawer.cs index 88be58e..8a1cc23 100644 --- a/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/SubclassSelectorDrawer.cs +++ b/Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/SubclassSelectorDrawer.cs @@ -81,7 +81,8 @@ namespace MackySoft.SerializeReferenceExtensions.Editor { m_TargetProperty.serializedObject.ApplyModifiedProperties(); }; - m_TypePopups.Add(managedReferenceFieldTypename,new TypePopupCache(popup,state)); + result = new TypePopupCache(popup, state); + m_TypePopups.Add(managedReferenceFieldTypename, result); } return result; }