Materials for modular assets

I started creating wall segments for a map I created.
The problem is to make the materials match on the segments.
See the attached screen shot.


Is there an easy way to create a material that is the same size no matter the size of the mesh?
I tried using the texture coordinate node but you have to play around with it to try to get almost the right size.

World aligned textures are what i would use, World Aligned Master Material - Chapter 2.5 - Unreal Engine 4 - YouTube explains it sort of well.

This problem seems to be due to the UVs not matching each other in terms of scale in relation with one another. In your modeling package, apply this material or a checkered one to your assets and scale the UVs until they are uniform. Don’t be afraid to go outside the bounds, it’s necessary at times.