class MAGES::Utilities::CameraFadeEffect¶
Overview¶
Script that executes the Fade-In-Out effect. More…
class CameraFadeEffect { public: // properties float CurrentFadeFactor; // methods static void FadeIn(float time = 1.0f, UnityAction onFinished = null); static void FadeOut(float time = 1.0f, UnityAction onFinished = null); static void FadeFromTo( float from, float to, float time, UnityAction onFinished = null ); static void Cancel(); };
Detailed Documentation¶
Script that executes the Fade-In-Out effect.
Properties¶
float CurrentFadeFactor
Gets the current fade factor.
Methods¶
static void FadeIn(float time = 1.0f, UnityAction onFinished = null)
Camera Fade In effect (Camera fades from black color to scene view).
Any other in progress fade effects will be stopped.
Parameters:
time |
The effect time. |
onFinished |
Action to be invoked when the effect is completed. |
static void FadeOut(float time = 1.0f, UnityAction onFinished = null)
Camera Fade Out effect (Camera fades from scene view to black color).
Any other in progress fade effects will be stopped.
Parameters:
time |
The effect time. |
onFinished |
Action to be invoked when the effect is completed. |
static void FadeFromTo( float from, float to, float time, UnityAction onFinished = null )
Generic Camera Fade effect.
Any other in progress fade effects will be stopped.
Parameters:
from |
The from fade factor. Range [0,1] where 0 means fully black and 1 means no black at all. |
to |
The to fade factor. Range [0,1] where 0 means fully black and 1 means no black at all. |
time |
Time between interpolation. |
onFinished |
Action to be invoked when the effect is completed. |
static void Cancel()
Immediately stops any running fade effect.
The fade factor will keep the current value.
Any attached callbacks will not be invoked.