Class ScreenFadeSelector
Selects and manages screen fade behaviors based on the configured fade method.
public class ScreenFadeSelector : MonoBehaviour, IUnityGameService
Inheritance
Implements
Methods
FadeIn()
Triggers a fade-in using the selected screen fade behavior, and in VR also the headset fade.
public float FadeIn()
Returns
float — The duration of the fade-in effect in seconds, or 0 if no behavior is found.
FadeOut()
Triggers a fade-out using the selected screen fade behavior, and in VR also the headset fade.
public float FadeOut()
Returns
float — The duration of the fade-out effect in seconds, or 0 if no behavior is found.
GetScreenFade()
Retrieves the screen fade behavior associated with the current transition method.
public ScreenFadeBaseBehaviour GetScreenFade()
Returns
ScreenFadeBaseBehaviour — The matching ScreenFadeBaseBehaviour instance.
TryGetScreenFade(out ScreenFadeBaseBehaviour)
Retrieve the screen fade behavior associated with the current transition method.
public bool TryGetScreenFade(out ScreenFadeBaseBehaviour fade)
Parameters
| Name | Type | Description |
|---|---|---|
fade | ScreenFadeBaseBehaviour | The resolved screen fade behavior if available. |
Returns
bool — true if a valid behavior is found; otherwise, false.