how do i make/work with int[ ][ ] arrays. i am working on a mazemaker games and i need to know how to set it and edit it so people can build mazes
Working with Jagged Arrays is explained here:
(Click on any of the C# tabs)
If you mean within the Inspector then it becomes a little more difficult. The Inspector doesn’t show 2D arrays.
What I do is ave an array of class IntArray, where IntArray contains a public array of ints.
if IntArray is marked with [System.Serializable] it will show up in the inspector as a functional 2D array.
As a more advanced option you can override the [ ] so that you can access the array like a 2D array in code (myEntire2DArray_[j]) instead of the other (myEntire2DArray*.myIntArray[j])*_