void Awake() { _buttons = GetComponentsInChildren <Button>(); for (int i = 0; i < _buttons.Length; i++) { int x = i % ROW_COUNT; int y = i / COLUMN_COUNT; _buttons[i].onClick.AddListener(() => { OnSelect.Call(new Vector2Int(x, y)); }); } }