Hey,
I have a script for blending a scene from a black GUItexture to 0 alpha.
This is the function that blends the scene in
GUI.color.a = Mathf.Lerp(1.5, 0.0, (Time.time-StartTime));
Here the ‘StartTime’ is the time the texture fades out and it gets defined here:
function OnLevelWasLoaded(){
// Store the current time
StartTime = Time.time;
}
I want to find a way to define the time where my character dies, He already has an OnTrigger function that calls his death.
I would like to apply this to a scene fade out, so the scene nicely fades out, then fades back in.
Thankyou in advance !