How to generate a grid? VERY beginner question

I just went througha simple course on Unreal 5 and I’d like to create a simplistic game from scratch (or almost).

I would like to generate a grid that would be available at design time in blueprint.

I think I’ll create a base class with a few methods/properties, including RowNumber and ColunmNumber.
I could drop my grid cells in BluePrint and assign the ColumnNumber and RowNumber but it feels clunky…

How could I generate my grids by simply stating how many rows and columns I want?
Then each grid element could probably infer its RowNumber and ColumnNumber buy its location?

As you can guess, I am really beginning in this so please be patient if it sounds too stupid a question…

Grid

Use ForLoop:

image

I hope it’ll be helpful to you.

My Products

4 Likes

2D Grid Execution macro. Couple of examples:

1 Like