More SelectionGrid Buttons? Or a better way to do this?

First off, apologies for the wall of text. I always feel I'm doing things wrong if I'm not being as detailed as possible.

Well, I'm pretty new here and just starting to get into GUI stuff. I'm an amateur at best when it comes to coding, but I would like to think I'm getting better. Anyway! I'm working on an inventory system/ship building system on one screen. Long story short, ship pieces all take one square worth of space and after hitting a finished button or what have you the ship is created in the 2D space of the actual game. I've got a large part of the game code finished, but now I've moved onto this and I'm a little stumped. Mostly because I've never worked with GUI before.

My initial plan was to have a selection grid that was 10x10. When a space is selected and you click on a button holding the materials in your inventory (Say, an iron block for example) that selection grid button changes to be an iron block image. Then I can simply construct the ship based on what texture is in each square. I'm honestly not -entirely- sure how to do that either, but that's a problem for another day, and I feel like I can figure it out at least. I hope.

Well, onto the real problem. I cannot for the life of me figure out how to make a selection grid have more than 4 buttons. I know it's stupid, but I just can't do it. The SelectionGrid accepts a variable it calls "xCount" which of course changes how many fit on each horizontal line, but there just doesn't seem to be something that controls how many buttons there are. Are you limited to 4? Or am I just the most unobservant person in the world? Also, if there is some glaringly obvious better solution to my current task than a selection grid, please do say so.

Thanks a lot for your time. It's amazing how helpful the people of this community are, and I wouldn't have had a chance even getting this far if it weren't for that.

It draws as many buttons as you pass strings in the texts parameters. Pass 16 strings, with an xCount of 4, and you'll end up with a 4x4 grid

I know this is an old topic, but I noticed Kyouri saying that it won’t reload until Unity restarts. The solution might be quite simple, if it’s the same I had.

When you declare it as a public variable, Unity reminds the variables in his property inspector thingy. But change it to private and it will work like a charm.

So don’t do this:

public string[] buttonStrings = new string[] {"Random Number", "Button 2"};

But do this:

private string[] buttonStrings = new string[] {"Random Number", "Button 2"};

Hope this helps for people that are struggling with this.