- Home /
UV tiling to fill face?
I have a mesh and uvs that I generate, and I want it to tile vertically and fill the face, but instead it turns out like this
http://i.imgur.com/9NjTHQF.png
Here is my code
for(int i = 0; i < topUvs.Length; i++){
if(select == 4){ select = 0; }
switch(select){
case 0: topUvs[i] = new Vector2(0, 2); break;
case 1: topUvs[i] = new Vector2(0, 0); break;
case 2: topUvs[i] = new Vector2(1, 2); break;
case 3: topUvs[i] = new Vector2(1, 0); break;
}
select += 1;
}break;
The code i have for assigning the uvs has seemed to work, but I think there is something that i am missing that i need to do to make it tile the way i want.
Thanks!
Answer by Paul-Jan · Mar 14, 2016 at 07:22 AM
Make sure your Texture.wrapMode is set to repeat, not clamp
Converted to an answer since this most likely is the answer (`99%`) ^^.
Your answer
Follow this Question
Related Questions
Assigning UV Map to model at runtime 0 Answers
UV Mapping for 2D Meshes with 3 Vertices Only 1 Answer
How to change object scale but keep material with old scale by script? 0 Answers
UV Problems When Model Imported Into Unity 0 Answers
'.' is not a valid texture file name on asset warning/error 1 Answer