store many GameObjects

I have a game with a lot of buttons and if for each of them there is a specific pack of other buttons and so on. To use the buttons i made arrays which i filled in the inspector. But for the third page of buttons, i would need about 16 arrays so far and i’m planning to add even more buttons in the futuzre. I also can’t use multi dimensional arrys because they don’t show up in the inspector. Does anyone have an idea how to store the buttons without using one massive array or a lot of small ones?

What’s the exact issue you are having with the array? That you need to fill manually in the inspector? I would probably go with one script with one array attached to the parent and for each parent have all the child’s buttons in the parent array, and that script recursively

It sounds like you are doing a bunch of nesting.

You could use the hierarchy for this.

Each button would have a number of child buttons that would be disabled by default.

Whenever a button is clicked a script could then enable all its children.

To navigate you could loop through all a buttons children.

sorry, i’m just a beginner in c# and unity. what exactly do you mean by that?
my issue is that with the many individual arrays i can’t use a for loop that goes through all the buttons and a large array would be extremely cluttered.