2

I'm working with Unity and C# making a platform game, i mostly used cubes/boxes of different scales to build the level and now i have to apply the texture, i played with the tiling but the texture obviously stretches to apply on different objects, making a different material for each object is too much, I heard that I should use shaders but I've never worked with them. Can anyone help me write a shader that can modify the tiling based on the size of the object? Thanks to everyone.

GabLog
  • 71
  • 1
  • 3
  • I guess you don't have to write a shader for this, try `renderer.material.mainTextureScale = new Vector2 (x, y);` – Daniel Jun 16 '18 at 21:15

0 Answers0