Paint Grid Texture

For my game, players will be able to build on a ship. On initialization, a series of raycasts are done to find where structures can be built. How can I paint the grid only on these areas?

I store the information in a bool[,] and I can convert the index of each bool to a local position relative to the grid. How do I paint a texture only on those places? Should I use a terrain for this job? or something like Texture2D?

Note: The texture I want to draw is a 1x1 grid block. On the image below, it is tiled 40 times X and Y using the Self-Illum soft edge unlit shader. The box around it is the gizmo drawn collider.

alt text

I’m not sure how exactly you’re painting your grid, but one way to do it might be to paint the grid with a projector.

You can tell a projector to ignore the default layer, and then you could set any gameobject you want to project the grid onto to a different layer.