- Home /
Question by
Benedikt_ · Jan 12, 2016 at 10:07 AM ·
unity 5uitransparencyalpha
Change transparency of UI elements.
Hi, short question: is there a way to change the default transparency-setting of UI elements? i would prefer a window in some settings options rather than writing a new script just for this purpose...
Comment
Answer by felixfors · Jan 12, 2016 at 02:49 PM
Add a " canvas group" component to your UI and change the alpha value
public float aValue = 1;
private CanvasGroup trans;
void Start()
{
trans = GetComponent<CanvasGroup>();
trans.alpha = a value;
}
// something like this, you may need to change the code though
wow you were right. please excuse this stupid question then, i somehow couldn't think of that -.- ashamed
heh no worries! I would like you to mark this as a correct answer if it helped you though :)