diff --git a/Assets/BetterCommons/Editor/Drawers/SerializeReferenceField.cs b/Assets/BetterCommons/Editor/Drawers/SerializeReferenceField.cs index 2ea976c..4d8e216 100644 --- a/Assets/BetterCommons/Editor/Drawers/SerializeReferenceField.cs +++ b/Assets/BetterCommons/Editor/Drawers/SerializeReferenceField.cs @@ -137,14 +137,11 @@ private void Update() panel?.visualTree.SendEvent(e); } - //Fix: fixing SerializedPropertyChangeEvent not been sent when set new type to null - if (newType.IsNullOrEmpty()) + //Fix: fixing SerializedPropertyChangeEvent not been sent when set new type to null or time has no sub properties + using (var e = SerializedPropertyChangeEvent.GetPooled(property)) { - using (var e = SerializedPropertyChangeEvent.GetPooled(property)) - { - e.target = PropertyField; - panel?.visualTree.SendEvent(e); - } + e.target = PropertyField; + panel?.visualTree.SendEvent(e); } _referenceType = newType;