Open mvaligursky opened 4 years ago
I don't think we can make this assumption. For example, check out the tween script and its first string attibute:
https://github.com/playcanvas/engine/blob/master/examples/assets/scripts/animation/tween.js#L13
It's the name of the event that triggers the tween. I think it'd be pretty weird to have that as the 'name' of the array element.
If people know thata's the rule (like it is in some other engine), they would put the string they want as first. But some more flexible solution we can do would work even better.
Maybe we can an Editor only field above/below the array size that takes a string for the property in the object of each entry that we would like to display.
When an array is displayed, we see each entry called [0], [1] ...
Perhaps if element contains a string attribute, it could be used to enhance it.
For example a first attribute of type string should be used .. so if we have Name: john it would show [0]: John