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.
Asked
Active
Viewed 259 times
2
-
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