- Home /
How to make a public game object array inside an array (or 2D array) that can drag and drop to fill?
when I make a public game object array I usually write:
public Game object[] daObject;
it's a 1D array that can drag and drop to fill the array
and if I make an array inside an array (non-public) I usually write:
int[,] number = new int [sizeA,sizeB];
but I can't merge it together it will make a non-public array, can you help me to find the solution?
Answer by AbandonedCrypt · Feb 15, 2021 at 02:29 PM
Of course you can make a multidimensional array public, it is public if you declare it like that. What you mean is that the Inspector does not visually display it, that is simply because it can't. The unity inspector does not have a native display functionality for multi-dimensional arrays.
There is a workaround though, which I havent tested myself.
well, I think I just use 2 different array or try to merge it into an array inside an array
Your answer
Follow this Question
Related Questions
can you hav an array of public GameOjects 1 Answer
Public Array of GameObjects 2 Answers
2D Array of GameObjects... 1 Answer
HELP Find gameObject With tag in another array 1 Answer
Creating an array of prefabs? 4 Answers