Search code examples
c#unity-game-enginegridunityscript

Generate grid in Unity


I would like to have a visible grid with a certain number of columns and rows in my game (Unity2D). I want the grid was aligned to the center. Just enter the number of columns and rows and the grid is generated. Can you help me find the best way? Thanks :)

P.S.: Sorry for my English :)


Solution

  • You might be able to use a textured UI panel and make it repeat the texture to fill in itself. I think that might be the best solution.