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!

why do we need to set x and y values for each object? is there any other way?

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.

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!

I would recommend try these possible solution.

  1. Select all the relevant textures check if “wrap mode” is selected as Repeat.
  2. 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