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.