how many UV channel unity support?

hi,
i looking in the manual and the forum, and i can’t find my answer.
how many UV chanel unity support per mesh?
you know, i wondering, for good looking, i can’t paint for example, Dirt on my texture, so what should i do for dirtmap on my wall object?

should i use a tiny plan of object with alpha for dirt on my wall?

Unity supports 2 UV sets per vertex

Thanks for your replay, but i wander, how can i reach to the second UV set?
how can i assign a material to UV channel 1 and then assign dirt material to second UV chanel?

That work is done by the shader you use on the material. It decides which UV set to sample.

check out the lightmap shaders as an example of shaders that use both uv sets

To use multiple UV sets you have one material with a (most likely custom) shader that samples textures based on either UV set. I think what you’re looking for are multiple material objects, which Unity also supports, but splitting objects up into multiple materials is handled in your 3d modelling package and not in unity. Also keep in mind that multiple materials means multiple draw calls, which can become an issue very quickly.

i see.
so, what is your offer for this situation?
for a wall with dirt? using 1 object with myltiple texture?
or using 1 object for wall, and then using another object with alpha chanel for dirt?

Personally I’d use two UV sets for something like that. Though you’d need a custom shader to make that work.

Something like this should work. I haven’t tested this though.

Shader "Blended Textures" {
    Properties {
        _MainTex ("Base (RGB)", 2D) = "white" {}
        _BlendTex ("Alpha Blended (RGBA) ", 2D) = "white" {}
    }
    SubShader {
        Pass {
            BindChannels {
               Bind "Vertex", vertex
               Bind "texcoord", texcoord0
               Bind "texcoord1", texcoord1
            } 
            SetTexture [_MainTex] {
                combine texture
            }
            SetTexture [_BlendTex] {
                combine texture lerp (texture) previous
            }
        }
    }
}

That ought to work perfectly from glancing at it. Here’s something I’m using, where UV 1 is utilized for two tiling textures, and UV2 is for both a lightmap and a splatmap:

http://www.unifycommunity.com/wiki/index.php?title=Blend_2_Textures_by_Lightmap_Alpha