A simple grid generator that can generate a grid from any square or rectangular mesh the script will automatically resize itself to fit whatever mesh you use.
Each "tile" in the grid needs to have the Tile.cs script attached Open the editor tool window and select the size of grid you want and hit generate
Link you youtube walkthrough: https://www.youtube.com/watch?v=RgUBkSLmBrI&ab_channel=ForlornU