|
When using the .cs below to declare and populate multidimensional javascript arrays, I get this error: MissingFieldException: Field 'System.Int32[,,].' not found. http://www.unifycommunity.com/wiki/index.php?title=JavascriptMultiDimArrays Here's a brief js that declares and populates one entry:
var multid;
multid=MultiDim.IntArray(10,10,10);
multid[0,3,5]=1;
Here is my .cs:
using UnityEngine;
public class MultiDim : MonoBehaviour {
public static bool[,,] BoolArray (int a, int b, int c) {
return new bool[a,b,c];
}
public static int[,,] IntArray (int a, int b, int c) {
return new int[a,b,c];
}
}
(comments are locked)
|
|
The point of using MultiDim, as described in the documentation, is that the variable is typed correctly using type inference, so doing
is wrong, because that's dynamic typing. It needs to be so you can't do a global variable for multid?
Dec 25 '10 at 03:28 AM
ina
Sure you can; not sure how that's related.
Dec 25 '10 at 05:45 PM
Eric5h5
(comments are locked)
|
