Question by
danidu93 · Mar 04, 2016 at 02:05 PM ·
c#scripting beginnerbuttonsopacity
Opacity object
Hi guys i dont really need it but im very curious if we can set opacity of an object from script. For example if we have a 2d app and you have a background image and on the background image there are buttons and you want to aply opacity to button is this possible? If yes how? Have a good day!
Comment
change the color of the material alpha from the button. http://docs.unity3d.com/ScriptReference/$$anonymous$$aterial-color.html
Answer by Matt-Face · Mar 04, 2016 at 03:49 PM
If it is a sprite, you should be able to use the alpha value of it's color. If it's 3D you may need to use a shader... The unity 5 standard shader has a transparent option... This is definitely achievable though...