- Home /
Different transparency on same texture?
Hello,
I want to make individual objects transparent. If I set the shader on the texture I use to "Transparent/Diffuse" I can make the texture transparent but this affects all objects with the same texture.
How can I make it so I can have several objects with the same texture but different transparency values?
I should also add that I want to be able to change transparency of objects dynamically through scripts.
Thanks
Answer by Eric5h5 · Apr 26, 2011 at 11:02 PM
Changing the renderer.material of an object at runtime will cause Unity to create a new instance of that material for you. So "renderer.material.color.a = whatever" will have the effect of making that object have different transparency than other objects.
Your answer
![](https://koobas.hobune.stream/wayback/20220613125534im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Alpha problem with textures on a plane 2 Answers
How to paint a texture transparent ? 0 Answers
Making a cutout semi-transparent? 1 Answer
Add transparency to this shader? 0 Answers