Skip to main content

Class FadeSettings

Configuration container for the screen fade render feature. Defines the behavior, execution timing, and material used during the fade.

[Serializable]
public class FadeSettings

Inheritance​

object→FadeSettings

Fields​

dynamicMaterial​

A dynamic instance of a material that can be assigned at runtime to avoid modifying the original asset.

[NonSerialized]
public Material dynamicMaterial

Field Value​

Material

isEnabled​

Indicates whether the screen fade effect is enabled.

[Tooltip("Enable or disable the screen fade effect.")]
public bool isEnabled

Field Value​

bool

material​

The base material used for the fade effect. This material must include a shader with a float property named _FadeAlpha.

[Tooltip("The material used for the fade effect. Must support a float shader property called '_FadeAlpha'.")]
public Material material

Field Value​

Material

profilerTag​

Label used in the Unity Profiler to identify the render pass.

[Tooltip("The label used for profiling the screen fade render pass.")]
public string profilerTag

Field Value​

string

renderPassEvent​

The timing within the render pipeline when the fade pass should be executed.

[Tooltip("When in the render pipeline the fade effect should be applied.")]
public RenderPassEvent renderPassEvent

Field Value​

RenderPassEvent

Properties​

RuntimeMaterial​

The material to use during rendering. Falls back to the asset material if no dynamic instance assigned.

public Material RuntimeMaterial { get; }

Property Value​

Material

Methods​

AreValid()​

Checks whether the settings are valid for executing the screen fade effect.

public bool AreValid()

Returns​

bool — true if the runtime material is available and the effect is enabled; otherwise, false.