From e170451f6a2ca3aca2989089fa74e20cd02af229 Mon Sep 17 00:00:00 2001 From: Akeit0 <90429982+Akeit0@users.noreply.github.com> Date: Wed, 21 Feb 2024 20:33:02 +0900 Subject: [PATCH] Fix: Changes in PropertyListView are not reflected when field don't have OnListViewChangedAttribute. --- .../Alchemy/Editor/Elements/PropertyListView.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Alchemy/Assets/Alchemy/Editor/Elements/PropertyListView.cs b/Alchemy/Assets/Alchemy/Editor/Elements/PropertyListView.cs index 361ab9d..3d314b8 100644 --- a/Alchemy/Assets/Alchemy/Editor/Elements/PropertyListView.cs +++ b/Alchemy/Assets/Alchemy/Editor/Elements/PropertyListView.cs @@ -27,10 +27,14 @@ namespace Alchemy.Editor.Elements var e = new AlchemyPropertyField(arrayElement, property.GetPropertyType(true), depth + 1, true); element.Add(e); element.Bind(arrayElement.serializedObject); - e.TrackPropertyValue(arrayElement, x => - { - ReflectionHelper.Invoke(parentObj, events.OnItemChanged, new object[] { index, x.GetValue() }); - }); + if (events != null) { + e.TrackPropertyValue(arrayElement, x => + { + ReflectionHelper.Invoke(parentObj, events.OnItemChanged, new object[] { index, x.GetValue() }); + }); + } + + } }; listView.unbindItem = (element, index) => {