Hello, I’m making a project about a memory game like this for example Human Benchmark
I want to know how do I change grind count by scripting?
I want to know how can I change the Cell Size and the Constraint Count value in the Grid Layout Group

It would be helpful for me to set the level to increase difficulty.
I haven’t used a GridLayoutGroup, but the scripting reference makes it look pretty easy. Looks like you just need a reference to your GridLayoutGroup component, then just change the same properties as visible in the inspector from your script.
https://docs.unity3d.com/Packages/com.unity.ugui@1.0/api/UnityEngine.UI.GridLayoutGroup.html
2 Likes
I agree with Uncle Joe, you can probably just poke at these references and change them.
Keep in mind you want to track your own notion of what is actually inside each cell to do the game logic (such as in your own 2D array of cells), and then only use the Grid for presentation, otherwise it can get veeeeery tricky if you rely on storing state in the UI.
3 Likes
Ahhhh I see, I’m still new to this intermediate unity programming but thanks 