How to access decal texture on decal shader with script?

Hi,

Quick question. What do I use to access the decal ( RGBA) of the decal shader by script ?

this works for the main diffuse texture – renderer.material.mainTexture –

renderer.material. ( what ? ) for decal texture.

Thanks.

You need to look at the shader to see what the property is called. Then:

Perfect, that answered the question. For anyone else wondering the same, the shader source is here.

http://unity3d.com/support/resources/assets/built-in-shaders.html

Thanks Jessy.

There’s also a sticky at the top of the ShaderLab forum section.