http://unity3d.com/support/documentation/Components/SL-SubshaderTags.html
I Find that in u3d can set the renderQueue by material and shader.
but how to control renderQueue in the same Layer with some model using the same material .
http://unity3d.com/support/documentation/Components/SL-SubshaderTags.html
I Find that in u3d can set the renderQueue by material and shader.
but how to control renderQueue in the same Layer with some model using the same material .
Set a different renderQueue value for each mode.
i.e. model1 = 1001, model2 = 1002, model3 = 1003.
Just be sure you use renderer.material.renderQueue and not renderer.sharedMaterial.rendererQueue. The last one changes for all objects using the material, the first one only for the object where the code is executed
To add to Tseng’s warning of sharedMaterials, if you’re dealing with an object that has multiple materials you can use renderer.materials[0].renderQueue. materials[0] is the first material in the list(array) of materials used by the object, materials[1] is the second, materials[2], the third, etc…
For some reason I had the idea that you could only access an array of materials with sharedMaterials[number] and was messing up a lot of materials before I realized the other option.