Skip to content

Instantly share code, notes, and snippets.

@keijiro
Created October 19, 2011 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keijiro/1297977 to your computer and use it in GitHub Desktop.
Save keijiro/1297977 to your computer and use it in GitHub Desktop.
JavaScript (UnityScript) multidimensional array
#pragma strict
static function BoolArray(a : int, b : int, c : int) {
return new boolean[a,b,c];
}
static function IntArray (a : int, b : int, c : int) {
return new int[a,b,c];
}
var testArray = IntArray(10, 10, 10);
testArray[1, 2, 3] = 123;
Debug.Log(testArray[1, 2, 3]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment