Maintaining original texture size while scaling objects

Hi there. I am in a greyboxing phase of my project and want to be able to use textures with Meter grids on them to aid in correct scaling. problem is, when i scale the object the texture scale with it making the grid size incorrect. does anybody have any techniques, scripts or assets which could help me out with this? it seems like something which should be included in probuilder or something as ive seen many greybox examples which emply this technique. many thanks.

GetComponent<Renderer>().material.SetTextureScale("_MainTex",transform.localScale);

Do you mean triplanar or world space UVs?

If you work in ProBuilder, you don’t scale the Transforms of the objects but rather go in and move individual vertices (points) around. When you do this, ProBuilder will normally handle the UVs, keeping them world-centric and object local.

If you’re just bonking a bunch of cubes and spheres around with scale and rotation, you can use something like this triplanar world shader:

i guess a world space texture would probably do the job thinking about it. would that work on all axis?

thanks I will look into this

Thanks for this also I will try out both approaches.