In Unity, Is there a way I can set up either associative arrays Code (csharp): value{key} = float or just as well, can I explicity define multi-dimensional arrays like Code (csharp): value[xInt][yInt] = float
If you're using Javascript, then you can't use multi-dimensional arrays. C# does support them though. For an associative array, use Mono's hashtable: http://msdn.microsoft.com/en-us/library/system.collections.hashtable(VS.71).aspx If you were using C#, you could use a Dictionary also.
Code (csharp): var foo = new Hashtable(); // Or "var foo = {};" if you want to be really terse foo["something"] = "blah"; You can use multi-dimensional arrays in Javascript. Code (csharp): var foo = new Array(10); foo[0] = new Array(10); foo[0][0] = "blah"; You can even use multidimensional built-in arrays in Javascript: Code (csharp): var tdata = Terrain.activeTerrain.terrainData.GetHeights(0, 0, 32, 32); tdata[10, 25] = .75; You just can't define them from scratch, apparently, for some reason. --Eric