Skip to content

Commit

Permalink
Update SerializeReferenceField
Browse files Browse the repository at this point in the history
  • Loading branch information
uurha committed Sep 6, 2024
1 parent 14826ed commit 12638ec
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Assets/BetterCommons/Editor/Drawers/SerializeReferenceField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 12638ec

Please sign in to comment.