How to texture an irregular (hexagon) shape (mesh) ?

Hi, I have made an algorithm for creating a 3d world made out of irregular shapes… but I have a problem when trying to texture those shapes…

I would like the texture to wrap the shapes , is this possible? If yes, how to do it by code?

This is my world currently which looks awful… :

A sample of the shapes :


It’s possible to make a tillable hex texture

You’d need to make sure the uv’s are laid out correctly for this to work.