I understood that List was supported in the inspector since version 3.0 (for the iPhone) and I guess 2.5 or 2.6 for the desktop. However, I’m trying to use it now, and the list displays in the incorrect order in the inspector, making it of little or no use. Is there something I need to do in order to get the inspector to update the order of the list, or do I just have to forget about using List and put in a whole lot of work manually shifting and resizing array elements?
I’ve never seen it do that.
–Eric
Hmm ok, must be something specific that I’m doing then. I’m writing a custom editor and it’s the first time I’ve had occasion to do so. So I could be missing out something important. The object the editor is for is one behaviour which contains a list of other behaviour (all extended from MonoBehaviour obviously.) The editor allows you to add, insert, delete, etc the child behaviours. If I add new ones to the end of the list, no problem. If I add a new behaviour in the middle of the list, however, the inspector shows it tacked on the end. Indexing the list in code demonstrates that this is not the order, and the item has, in fact, been inserted as I requested. Any reason that should fail?
Put another way, is there a way to force the Unity inspector to reexamine the list and therefore update what’s showing in the inspector to match the object?
Anyone?
Right. well since no one seems to think that this is the way it should behave, and no one has any suggestions to force the inspector to update its view of the list, I’m going to assume it’s a bug. I’ll try to create a minimal sample project and submit it as a bug report.