I am building a 2D board game in Unity with a static camera pointed down at the game board. During the active phase of each player's turn, I want to detect where they click on the board. Fortunately, the board is laid out in an easy rectangular grid. (Essentially a trio of 5x5 grids).
Which of the following would be best practice to implement this?
Create invisible colliders for every square on the board and create a translation function that translates those back to board positions (5,3) with Raytracing?
Get the translated coordinates of the click and use a function to figure out which square (if any) the click is in using the mouseclick event handler (by calculating which square the grid coordinates fall in)?
Make each square a button with its grid identity encoded and use that in its
Edit: 4) Some other idea I haven't thought of yet?
Experience level: I'm just learning Unity, but have written a lot of C# (and tons of other code).