Display list of 2D arrays

Simply, how do I make public List<bool[,]> appear in the inspector? Every bool[,] is a solution to a puzzle in my game and I want to be able to edit them in the inspector.

Try [System.Serializable] above the variable.

@Salmjak, error CS0592: The attribute System.SerializableAttribute' is not valid on this declaration type. It is valid on class, struct, enum, delegate' declarations only

@stepan.stulov Thanks for poiting that out! I've worked with serialized lists before, but I think I used a custom class that was designed to be serialized to work around it. I wasn't sure when replying though :) Thinking back again I do believe it was a serializable dictionary class.

1 Answer

1

Unity can’t serialise multidimensional arrays form the box.
Here is a forum thread about how to (semi-) enable it:

http://forum.unity3d.com/threads/how-do-i-get-multidimensional-arrays-to-persist.82038/