From 17e66635c36015f05f1989807a8ccef3ef05cd83 Mon Sep 17 00:00:00 2001 From: uurha Date: Fri, 6 Sep 2024 02:13:29 +0200 Subject: [PATCH 1/2] Fix SerializedPropertyChangeEvent not been sent when set new type to null --- .../Editor/Drawers/SerializeReferenceField.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; } From 6826c57a798c53156fd04f7411f76808b9bc2056 Mon Sep 17 00:00:00 2001 From: uurha Date: Fri, 6 Sep 2024 02:13:37 +0200 Subject: [PATCH 2/2] Update package.json --- Assets/BetterCommons/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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": {