I have an array of arrays. I am wondering
// why does this work
Debug.Log("woodPriceArray[whichRes] = " + woodPriceArray[whichRes]);
Debug.Log("priceArrays = " + priceArrays);
// 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]);
woodPriceArray is set to quantityArray
priceArrays gives the same result as woodPriceArray
Answer by Seth Bergman
May 02, 2012 at 11:58 AM
turns out, as suspected my info was outdated.. here's a link that may start you down the right track:
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
see answer above, you would say it as: quantityArray[1,1] etc..
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
To help users post good questions and use the site effectively we have posted a user guide. Please check it out.
Answers and Comments
4 People are following this question.
Returning one dimension of a two-dimensional array
Multidimensional Array of Vector2
Is there any way to view 2d arrays in the inspector?
How to get length of inner array in unityscript multidimesional array?
create mixed multidimensional array