|
I have an array of arrays. I am wondering Debug.Log("woodPriceArray[whichRes] = " + woodPriceArray[whichRes]); Debug.Log("priceArrays[1][1] = " + priceArrays[1][1]); // and not this, which is essentially the same thing ( n o t e : whichRes =1 ) var randVar : int = 1; Debug.Log("LOOK HERE 1: " + quantityArray[whichRes][randVar]);
(comments are locked)
|
|
I'm not sure if this is currently accurate, but I've had difficulty in the past, and never actually figured out back then, how to get multi-dimensional arrays working in javascript. They will definitely work with c# though.. EDIT: turns out, as suspected my info was outdated.. here's a link that may start you down the right track: http://answers.unity3d.com/questions/11963/how-to-create-multidimensional-arrays-in-javascrip.html looks like it's: QuantityArray[1,1] ok, thanks for the quick reply. I dont know c# so that wont help me just now... hmmmm
May 02 '12 at 11:59 AM
littlemegzz
Does anyone else know whether this is just some unity javascript thing?
May 02 '12 at 12:03 PM
littlemegzz
see answer above, you would say it as: quantityArray[1,1] etc..
May 02 '12 at 12:15 PM
Seth Bergman
(comments are locked)
|

woodPriceArray is set to quantityArray[1]
priceArrays[1][1] gives the same result as woodPriceArray[1]