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; diff --git a/Assets/BetterCommons/package.json b/Assets/BetterCommons/package.json index 8528e85..50ccb51 100644 --- a/Assets/BetterCommons/package.json +++ b/Assets/BetterCommons/package.json @@ -1,7 +1,7 @@ { "name": "com.tdw.better.commons", "displayName": "Better Commons", - "version": "0.0.50", + "version": "0.0.51", "unity": "2021.3", "description": " ", "dependencies": {