How to Write a 2d Array

Hi, all! I have a variable that I would like to set manually for ‘reasons’ and it is a 2D array.
For Example:

  var FooArray : int[,] = new int[2,3];

So how would I write this in code and assign variables to it?

I tried this:

function Awake(){
    FooArray = [[1,2,3],[4,5,6]]];
}

But soon found that that assignment makes a ‘’ not a ‘[,]’. So how do I write a ‘[,]’?

Thanks, all! -YA

Check if this helps you.

sorry I saw this earlier and I forgot to post it!

this worked-

var a : float[,];
a =new float[3,3];
a[2,2]=3;
a[1,2]=2;

Something like this?

int[,] a = new int [,] { {1,2,3,4,}, {5,6,7,8}, {9,10,11,12} };

Tried all sorts of tricks to make this work in Javascript with no success. I suggest either working with or C#.

lots and lots of people do 3d and 4d arrays in unity-

To find all their previous questions including the answer to this which I have seen look for multi-arrays and multidimensional arrays on the forum

http://search.unity3d.com/uss1/?q=multi-array&type_of_search=answers
http://answers.unity3d.com/questions/203893/javascript-multidimensional-array-with-pragma-strict.html