I am trying to fade out a GUI area with iTween. I purchased an animation example from the iTween site so that I could see how to invoke an animation / fade, etc … but I can’t seem to put it together for a fade :evil:
Here is my fade function:
function fadeOut_Details()
{ iTween.FadeUpdate(gameObject,iTween.Hash("alpha",0,"time",2));
}
… and this function is called from an OnGUI call (not visible here) and I currently hide / show the GUI contents of this function with a boolean flag (also in non-visible OnGUI). However, I want to fade it out rather than a simple “snap hide”.
function displayLessonDetailsWindow()
{
// Background Overlay
if(GUI.Button(Rect(0,0,500,500),"Click to Fade Out",Background_win))
{
// Click big BG button to fade out self and area below.
fadeOut_Details();
}
GUILayout.BeginArea(Rect (0,0,500,500));
// GUI Stuff in here ...
GUILayout.EndArea();
}
I’ve been all over Google for answers and I’m not really finding anything substantial … any help would be greatly appreciated!
(Please don’t point me to the iTween docs… I’ve been there many times)
Thanks!