|
I'm trying to get a multidimensional array working. I have: When I run the app, the accessing of aGrid fails saying aGrid is null, even though the intX and intY indexing variables are valid (i.e., are values between 0<4). Didn't I initialize aGrid correctly in the Start() function? Do I need some type of aGrid = new Card[4,4]; statement?
(comments are locked)
|
|
Actually, while writing the original question, I came up with the correct answer. I added the statement: to the Start() function and everything works. Thanks for taking the time to post your answer to this, I am working though the same problem in the Unity book and was looking for a "#pragma strict" way to do this for the old 3.x code.
Mar 21 at 01:54 AM
_Gloam
If this is the answer, please accept it so the question shows up as answered :)
Mar 21 at 03:00 AM
Benproductions1
I attempted to do that, but says I do not have permission. I am guessing there is some sort of waiting period before I can mark questions answered.
Mar 21 at 03:04 AM
_Gloam
@_Gloam Only an Admin/Moderator or the person who asked the question can accept an answer. My comment was towards @StevenCalwas
Mar 21 at 03:10 AM
Benproductions1
@Benproductions1 Gotcha, upvoting was giving me the trouble I suppose. Looks like I am short on karma ATM.
Mar 21 at 03:15 AM
_Gloam
(comments are locked)
|

if it is a fixed array give the size of it throught editor!