Skip to main content

Class RendererScreenFadeBehaviour

A screen fade behavior that performs screen fade transitions using a custom fullscreen Universal Render Pipeline (URP) renderer feature. The effect is achieved by modifying a dynamic shader material within a custom render pass.

public class RendererScreenFadeBehaviour : ScreenFadeBaseBehaviour

Inheritance​

Inherited Members​

Remarks​

The material or shader used with this behavior is required to define a float property with the shader property ID _FadeAlpha in order to work correctly.

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.