Combined meshes not connecting

Ahoy folks,

I’m making a game where the map is procedurally generated using hex tiles, one of these will be a water tile. I bought a Stylised water material from the Unity asset store and intended to use it on these tiles, however it doesn’t work with individual tiles:

I reached out to the creator and he suggested I use the ‘Combine Meshes’ doo-dad to turn all the water tiles into one big mesh, so I did:

And this worked! …sort of, it did indeed turn all the water tiles into one mesh, however the issue with the tiling material still happens, it’s as if the mesh is not properly glued together or something?:

I tried using ProBuilder to weld the verts and edges, which worked eventually but I couldn’t figure out how to work it in code.

Any headache-alleviating suggestions would be appreciated.
Thanks all.

Is that the Hardwater addon? I bought that one… I think it won’t work unless you do have a continuous mesh.

If you want to join those Hexes to share verts, do your own combine but:

  • eliminate dupe verts (don’t try to be clever, just brute force it for the first version)

  • renumber triangles that use eliminated dupes

If that’s fast enough you’re done. I assume this only happens on level load?

Otherwise you’d need to make a spatial bucketing thing to speed up the eliminate dupe verts.

ALSO, for future reference, photographs of code are not a thing.

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: Using code tags properly

My question may be dumb, but if the water shader works best with a continuous mesh, could you not make all the water hexes plain(basic), then combine them, then add the water shader?

I’ve personally never used combine meshes within Unity, something like that I’d modify in blender. Same goes for downloaded shaders, at best I just get the material to use with my own water meshes. So I am well out of my own ball park on this one. :face_with_spiral_eyes:

But if you ever figure it out, it would be nice to see what you came up with to fix said issue! Cheers!