Fix: Changes in PropertyListView are not reflected when field don't have OnListViewChangedAttribute.

This commit is contained in:
Akeit0 2024-02-21 20:33:02 +09:00
parent b03898d42a
commit e170451f6a

View File

@ -27,10 +27,14 @@ namespace Alchemy.Editor.Elements
var e = new AlchemyPropertyField(arrayElement, property.GetPropertyType(true), depth + 1, true); var e = new AlchemyPropertyField(arrayElement, property.GetPropertyType(true), depth + 1, true);
element.Add(e); element.Add(e);
element.Bind(arrayElement.serializedObject); element.Bind(arrayElement.serializedObject);
if (events != null) {
e.TrackPropertyValue(arrayElement, x => e.TrackPropertyValue(arrayElement, x =>
{ {
ReflectionHelper.Invoke(parentObj, events.OnItemChanged, new object[] { index, x.GetValue<object>() }); ReflectionHelper.Invoke(parentObj, events.OnItemChanged, new object[] { index, x.GetValue<object>() });
}); });
}
}
}; };
listView.unbindItem = (element, index) => listView.unbindItem = (element, index) =>
{ {