I have the following code:
public int lengthInt;
public int[, ] data = new int[0, 0];
void Start(){
data.Length(0) = lengthInt; //error
data.Length(1) = lengthInt; //error
}
From what I understand you can’t just have:
public int lengthInt;
public int[, ] data = new int[lengthInt, lengthInt];
You have to define the array length in a runtime function. However if I just had:
public int lengthInt;
void Start(){
public int[, ] data = new int[lengthInt, lengthInt];
}
That would work but then it doesn’t show up in the inspector. So how do I set a multidimensional array length and have it visible in the inspector?
Thanks!