x


Change alpha value of GUI.Box assigned texture?

Im trying to change the alpha value of the texture i have in my GUIStyle that im using on a GUI.Box. Is this possible? Tried this but no luck, wont compile with that syntax, is there a correct form im missing?

var alpha : float;

GUI.Box (Rect (Screen.width-400, 35, 300, 120), "", redWindow.(1, 1, 1, alpha));

Or maybe is there a way to change the alpha through manipulating the GUIStyle? Hm..

more ▼

asked Apr 13 '10 at 11:50 PM

frmusta gravatar image

frmusta
108 17 17 28

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Change GUI.color.a before the GUI.Box command then change it back afterward.

more ▼

answered Apr 14 '10 at 01:40 AM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

Saved the day again Eric5h5, thank you! Works perfectly.

Apr 14 '10 at 04:59 PM frmusta
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2206
x329
x111

asked: Apr 13 '10 at 11:50 PM

Seen: 4476 times

Last Updated: Apr 13 '10 at 11:50 PM