- Home /
Fadeing GUI created in OnGUI()
Hello!
I have a game where I am fading the scene to make smooth transactions, but the GUIButtons, GUIBoxes, etc. created WITH function OnGUI are not fading away(currently using this script Fade).
I managed to find a script here, but it was in C# even if I managed to fit it into my game I would not fully understand it and therefor I would not be able to create my own in the future as I do not like to rely on others and go search for scripts. I will rather much create my own and make them suite my needs.
So if you know a way of fading away GUIBoxes and buttons created with the function OnGUI(), it would be very much appreciated.
Answer by Eric5h5 · Jul 14, 2011 at 07:01 PM
Change the value of GUI.color.a over time. Usually you'd set GUI.color before a button (or whatever) and reset it afterward.
Your answer
Follow this Question
Related Questions
Fade script working but I can't 'see' it working? (Solved) 1 Answer
Fade camera while teleporting 1 Answer
OnGui Function help 1 Answer
Using Polish characters in OnGUI 1 Answer