Skip to main content

Class CanvasScreenFadeBehaviour

A screen fade behavior that performs screen fade transitions by modifying an CanvasGroup's alpha. This implementation adjusts the alpha of a UI overlay to simulate screen fade-in and fade-out effects.

public class CanvasScreenFadeBehaviour : ScreenFadeBaseBehaviour

Inheritance​

Inherited Members​

Methods​

FadeIn()​

Starts fading in the screen from black using a default duration.

public override float FadeIn()

Returns​

float — The duration (in seconds) of the fade in operation.

FadeIn(float)​

Starts fading in the screen from black over the specified duration.

public override float FadeIn(float duration)

Parameters​

NameTypeDescription
durationfloatThe duration (in seconds) to complete the fade in.

Returns​

float — The duration (in seconds) of the fade in operation.

FadeOut()​

Starts fading out the screen to black using a default duration.

public override float FadeOut()

Returns​

float — The duration (in seconds) of the fade out operation.

FadeOut(float)​

Starts fading out the screen to black over the specified duration.

public override float FadeOut(float duration)

Parameters​

NameTypeDescription
durationfloatThe duration (in seconds) to complete the fade out.

Returns​

float — The duration (in seconds) of the fade out operation.

  • Methods
    • FadeIn()
    • FadeIn(float)
    • FadeOut()
    • FadeOut(float)