How to scale 3D objects without scaling the material/texture?

Hey, im trying to build a house out of single blocks for the walls, floor etc.

My problem is, that the Texture for the walls stretches if i scale the wall

Is there a way to let the texture have the same size everywhere in the world, independent of the scale of the object?

Or should i better model the whole house 3D structure in an other Program, so that it is only one gameobject?

I also thought if i could group the blocks to one object in unity somehow and add the texture to the group “object” then?

  • you need to create a shader material that takes his tiling based on a global scale instead of an object scale.
  • or code it:

by changing the tiling in the material based on your object scale 202198-image-2022-11-24-131445547.png