Hey all! I’m using Unity 6 and the new workflows in UI Builder that allow to provide an Item Template for elements such as ListView.
For context, this is an Inspector for a component that contains a Component[]
, that I’m trying to visualise with a ListView.
If I don’t provide a template, the list works fine:
If I do, I can’t figure out a way to automatically bind an ObjectField
or PropertyField
to connect to the element in the source collection.
I noticed that I can use the property name (it’s called _preservedComponents
) and do like:
_preservedComponents.Array.data[0]
and it works, but they obviously all show element 0.
Is there a magic wildcard that I can use to have the elements auto-bind to the correct item in the array?
(I am aware I can do it in C#, I was wondering how to use it from the editor)