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.
To help users navigate the site we have posted a user guide.
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).
Answers and Comments
4 People are following this question.
How to get length of inner array in unityscript multidimesional array?
Is there any way to view 2d arrays in the inspector?
create mixed multidimensional array
Why can't I push and pop from string array?
Access the name of a sub array in a multidimensional array