Lately, I'm working on redoing the mesh algorithms for my game. The game is set up as cubes, and I only render visible sides to save performance. I also re-use vertices for multiple faces to stay away from Unity's vertex limit. If you don't understand, here's a picture:
In the example, the blue face would be the visible face. From my 8 possible vertices, triangles would be drawn across (1,4,5) and (1,0,4). As far as I know, this is working correctly. But now I need to do this with UVs. I currently use a texture atlas, and I cant quite comprehend how I'll map the textures to the vertices, because each vertex can be a part of multiple faces. Does anyone know a solution to this? I'll provide my code if needed.