I need that when I clicked on the left side of the screen, the squares moved to the left, and on the right side - to the right. (Black is in place of yellow, and yellow is in place of green, etc.).
Please tell me how to implement it. I am new to Unity.

номер столбца минус 1. And at the leftmost one by N (the number of columns) .... when pressed right, the opposite is true:номер столбца плюс 1and the rightmost one is at 0 (the array starts with it) - Alexey Shimansky