- Home /
Texture repeat not working!
Hi,
I want to tile a texture over a large object and it just stretches. My texture settings are: Texture type: Texture
Alpha from grayscale: false
Wrap Mode: Repeat
Filter Mode: Bilinear
Aniso Level: 1
Override for PC: false
My material is set to: Unlit/Texture
Even if I try setting wrapMode to repeat from code it still doesn't work. Can anyone please make sense of wtf is going on?
Thanks!
Answer by pandatree12 · Jan 30, 2017 at 10:12 PM
After you apply the texture Unity will automatically make a new material for this, it should go to the Materials folder but look around. After finding the material in the inspector there will be a tiling option and just change the numbers.
Answer by Bigproblem01 · Jan 30, 2017 at 10:31 PM
I create my own material, no need to search for Unity's. I got it! Since my level is procedurally generated and I then replace the floor with one quad, I needed to get the sharedMaterial.mainTextureScale and set the X and Y tiling of floor's material. Makes sense, thanks Pandatree12!
Answer by anuragdj · Oct 29, 2018 at 07:05 PM
I would recommend try these possible solution.
Select all the relevant textures check if "wrap mode" is selected as Repeat.
If yes, change it to clam, run the application and again change it back to Repeat.
If above dosen't solve your issue then, I am hoping you are applying your own shaders.
Now, again select all the relevant textures and uncheck the Generate Mip-Maps from Advance settings in the inspector tab.
Hope this would resolve your queries.
Regards, Anurag.Hacker
Answer by erenalkan2426 · Jun 01, 2021 at 03:11 PM
why do we need to set x and y values for each object? is there any other way?