- Home /
Procedual quad doesnt display texture - only single color
Hey there fellas,
so here is the deal. Its really not that complicated at all:
I have a custom mesh I generated. Looks like this:
As you can see it is just a quad.
Verts: (0|0) (1|0) (1|2) (0|2)
Now, I want to apply a simple checkerboard texture to this. As you can see though the mesh is completely white. Here is the material, as well as the texture import settings:
I can make the quad turn completely black if I mess with the offset values on the material, but the texture will never correctly apply.
It will however correctly display if I use the default 1x1 quad. So the problem must be in the fact that this quad is procedual.
Messing with tiling and offset did not help. I couldnt find anything in the import settings either.
Any ideas? :D
Answer by HawkSandwich · Jun 17, 2017 at 11:03 PM
Vertices don't determine texture coordinates, you need to set the uvs along with the verts :p
And how would I do that? Clearly Im not too experienced with textures :P
Ok... i just researched and I assume its this, right here:
https://docs.unity3d.com/ScriptReference/$$anonymous$$esh-uv.html
Thanks for your help man :D
Your answer
Follow this Question
Related Questions
Why does this script put Unity into a not responding state? 0 Answers
Do I need to split my mesh up to properly UV texture it? 1 Answer
Apply Generated Texture to Mesh 1 Answer
How do I go about texturing a flat-shaded generated mesh? 1 Answer
How to texture walls in procedurally generated mesh? 1 Answer