When I apply my texture to a relatively large object, it stretches and doesn’t tile, which I need it to. Please help
I know that this is a really an acient post but here is my answer that I found just exploring around :
- Go to the object with the texture you want to unstretch
- Click on the material or texture
- Go in Main Maps and put the Tiling to the dimensions of your object

See Unity - Manual: Material Inspector reference. Just set the Tiling x and y to whatever you need.
Here is the solution:
- Click on your sprite in the Project
- In the inspector change the Warp Mode to Repeat
I figured how to make it tile without having to change it for each object. although it doesn’t attach to a material, you can just attach it to a game object, and it will tile using the tile x, and y in the editor (you will have to change the texture from a
script)
public class GifTexture : MonoBehaviour
{
[SerializeField] private float tileX = 1;
[SerializeField] private float tileY = 1;
Mesh mesh;
private Material mat;
void Start()
{
mat = GetComponent<Renderer>().material;
mesh = GetComponent<MeshFilter>().mesh;
}
void Update()
{
mat.mainTextureScale = new Vector2((mesh.bounds.size.x *
transform.localScale.x)/100*tileX, (mesh.bounds.size.y * transform.localScale.y)/100*tileY);
}
}
Set the mesh x, y at the same proportion of the image.
if the texture is 720 x 1080… set the scale to something like 72 x 108.
@Jalima142
Make a material whitch you can add a texture to it.
Here’s how to do it:
- Select the Material in the “project” tab.
- Get into the inspector and go to “Secondary Maps”.
- import your texture asset (if you haven’t allready) and drag it in to “Detail Albedo”.
Now the texture still should be stretched but to change that:
- Do the instruction above this one first or it may not work!
- Go to “Secondary Maps” again and there you’ll see the setting “Tiling” There you can change the “X” and “Y” change it for the best look.
I know I’m late but if someone else want to know now when you cannot enter the link by @Graham-Dunnett
Hope it worked for you
Glad to help
