- Home /
Assign material to second UV map
Hiya all,
I've got a mesh which contains two UV sets and one material (diffuse). At runtime I assign a second material (Transparent/Diffuse) to this mesh using the following code in the Start() routine:
obj.renderer.materials = new Material[]{obj.renderer.material,secondMat};
However, both of these are mapped using the first UV set.
Question: Is there any way I could make it so that material #1 uses UV Set #1, and Material #2 uses UV Set #2? Would I have to write my own shader?
Answer by Eric5h5 · Oct 24, 2010 at 05:36 PM
You're just assigning two materials to the same renderer, which doesn't have anything to do with UV sets. Making a texture use the second UV set requires an appropriate shader.
Your answer
Follow this Question
Related Questions
Assigning UV Map to model at runtime 0 Answers
Separate Shininess Map? 0 Answers
texture maps render on one side only 1 Answer
Should I use a material for each sprite? 0 Answers