From f80675ce61935f90335f4a91cb593521941c3d9b Mon Sep 17 00:00:00 2001 From: uurha Date: Fri, 6 Sep 2024 00:18:25 +0000 Subject: [PATCH] Merge pull request #52 from techno-dwarf-works/feature/refactoring Version 0.0.49 --- Editor/Drawers/SerializeReferenceField.cs | 10 ++++++++++ package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Editor/Drawers/SerializeReferenceField.cs b/Editor/Drawers/SerializeReferenceField.cs index f25e005..a92d01a 100644 --- a/Editor/Drawers/SerializeReferenceField.cs +++ b/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/package.json b/package.json index 98baf75..55c7216 100644 --- a/package.json +++ b/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": {