diff --git a/Assets/BetterCommons/Editor/Drawers/SerializeReferenceField.cs b/Assets/BetterCommons/Editor/Drawers/SerializeReferenceField.cs index f25e005..a92d01a 100644 --- a/Assets/BetterCommons/Editor/Drawers/SerializeReferenceField.cs +++ b/Assets/BetterCommons/Editor/Drawers/SerializeReferenceField.cs @@ -137,6 +137,16 @@ private void Update() panel?.visualTree.SendEvent(e); } + //Fix: fixing SerializedPropertyChangeEvent not been sent when set new type to null + if (newType.IsNullOrEmpty()) + { + using (var e = SerializedPropertyChangeEvent.GetPooled(property)) + { + e.target = this; + panel?.visualTree.SendEvent(e); + } + } + _referenceType = newType; } diff --git a/Assets/BetterCommons/package.json b/Assets/BetterCommons/package.json index 98baf75..55c7216 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.48", + "version": "0.0.49", "unity": "2021.3", "description": " ", "dependencies": {