|
I am having trouble declaring and using a 2 dimensional array in javascript using unity 3.3 So many errors? I'm following examples other people have posted about the multidimensional arrays in javascript in 3.2 Any ideas? thanks Dan
(comments are locked)
|
|
Javascript 2d arrays are tricky. I ended up looking up C# 2d arrays and then moved the syntax to javascript and it worked. Here's what I found worked: That should be all the information you need to work with and loop through 2d arrays. Yep. That works. They should update the docs under arrays with your suggestions about how to use them.
Aug 03 '11 at 06:35 PM
dansav
Fascinating that the "length" is a kind of a function across the dimensions!! Would never have guessed, and it's totally undocumented of course. Cheers.
Jun 02 '12 at 02:30 PM
Fattie
The length calls in unityscript gives me... BCE0077: It is not possible to invoke an expression of type 'int'. What's up with that?
Mar 11 at 06:32 PM
Jason.King
It should get GetLength, not Length.
Mar 11 at 08:48 PM
Eric5h5
Thanks Eric5h5! GetLength compiles. But where is that documented? Even after knowing the proper semantics, I'm having trouble finding a definitive entry within language docs. I assume there may be other functionality attached to multidimensional arrays. Where can I find the complete set available to unityscript?
Mar 11 at 10:13 PM
Jason.King
(comments are locked)
|

Please don't cross-post both here and on the forums.