- Home /
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.
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.
Answer by stepan-stulov · Aug 24, 2015 at 07:59 PM
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/
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Serialize custom multidimensional array from Inspector 3 Answers
Custom Editor DragAndDrop for List 1 Answer
Inspector scripting, adding lists, checkboxes and buttons [With Image] 0 Answers
Why is my unity editor script not saving changes to the actual script? 0 Answers