Merge pull request #50 from Akeit0/fix-propertylistview

Fix: Changes in PropertyListView are not reflected when field don't h…
This commit is contained in:
Annulus Games 2024-02-21 21:21:08 +09:00 committed by GitHub
commit c08aaaf3a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<object>() });
});
if (events != null) {
e.TrackPropertyValue(arrayElement, x =>
{
ReflectionHelper.Invoke(parentObj, events.OnItemChanged, new object[] { index, x.GetValue<object>() });
});
}
}
};
listView.unbindItem = (element, index) =>
{