|
I've created a custom inspector for a tile-based system I'm working on. The target's layout (the number and orientation of the tiles it takes up) is represented as a 2D list of boolean values (eg
(comments are locked)
|
|
I think A possible answer to this is that you have to set the In this case I suppose it would be
If you are using
Putting it this way make Unity understand that this attribute must be serialized, and not shown in the inspector (altough that double list is not standard for unity, so probably it wont be shown either). Another possible problem is that you may be making some "reintialization" of the code somewhere in your MyClass script, try to check that out (Maybe in A third possible solution is to enable the tag
I hope this will help you. Italo F. Capasso B. AKA "Edwood Grant" EDIT Upong checking it further, it seems that
This should definetly work, and it wil even be shown in the default inspector with Italo F. Capasso B. AKA "Edwood Grant" Thanks for your suggestions. SerializeField and ExecuteInEditMode didn't seem to work, sadly. I don't think it's a problem in Start/Awake, because the reset happens even to prefabs in the project pane as soon as I hit play (even if it's an empty scene).
Jul 29 '10 at 01:56 PM
burnumd
Well I've been cheking by myself, and it looks like List<List> cannot be serialized, you will have to use another kind of construct to make that work... I managed to do it by creating a serializable class that contains bool list, and then create another list in MyClass that contains the list of that class
Jul 29 '10 at 06:28 PM
edwood_grant
Huh. That's an onerous way of having to go about it, but thanks! If you'd care to type that up in an answer, I'd like to mark it as answered appropriately.
Aug 02 '10 at 01:52 PM
burnumd
I was having a similar issue. SetDirty worked for me. Thanks edwood.
Nov 21 '12 at 09:51 PM
Lukas_GMC
(comments are locked)
|
|
I'll bite :), List> cannot be serialized. I'd need to check, but I think we fixed this for Unity3.
(comments are locked)
|

As it seems no one has an answer, I've filed a bug on this issue. If there turns out to be a workaround or it's confirmed to work in a future version of Unity, I'll update with an answer.