Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: jeaky on March 16, 2013, 12:49:16 PM
-
Hi, I want use slider to control the alpha value, but I don't know how to write the code, I have writed some code bellow but not have any change in the scene. Anyone help me plz ?
var slider : float = 1;
var v1 : GameObject;
function OnSliderChange () {
v1.renderer.material.color.a = slider;
}
-
any help?
-
Widgets don't have a renderer. Get the UIWidget component and modify its alpha property.