Is "Add Child To Uniform Grid" Broken?

Hey All.

I’m just trying to create a nested for loop inside another for loop that will populate a Uniform Grid with widget squares…

I tell it I want to go on the X axis by 5 squares, and on the Y by 10. However when I run the code, it creates it in the opposite way. This messes up my code later on when i’m trying to get specific values out of the widgets

Has anyone run into this before and knows a solution? Simply cheating and swapping the X and Y won’t work unfortunatley.

Bump. Anyone got any ideas?

The Uniform Grid is working correctly. You have your values backwards.

This should be Number Of Columns (X Across)
image

And this should be Number of Rows (Y Down)
image

Yep. I realised I’m a complete idiot who was thinking about them backwards.

Not my finest of moments…

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.