Version:

ScreenFader EBuses

ScreenFader EBuses

Provides the Lua scripting equivalent to the Screen Fader node in Script Canvas.

For more information about using the event bus (EBus) interface, see Working with the Event Bus (EBus) system.

Contents

ScreenFaderRequestBus FadeOut

Triggers fading out to a solid color.


ParameterTypeDescription
colorColorThe color to fade out to. The use of the Color property depends on the value of Use Current Color, and whether you are fading in or fading out.
durationFloatDuration of the fade out in seconds.
useCurrentColorBooleanWhen true, the transition uses the current color for the fade overlay. When false, the transition begins fully transparent.Current Color is the color that is rendered by the fader, including the alpha channel. This is generally whatever color is left over from prior fading activity.The Color Property Behavior table shows the color values that are blended to create the fading transition.
updateAlwaysBooleanContinues fading even when the game is paused.

ScreenFaderRequestBus FadeIn

Triggers fading in to a solid color.


ParameterTypeDescription
colorColorThe color to fade through. Ignored if Use Current Color is true.
durationFloatDuration of the fade in seconds.
useCurrentColorBooleanWhen true, the transition uses the current color for the fade overlay. When false, the transition begins from the target color.
updateAlwaysBooleanContinues fading even when the game is paused.

ScreenFaderRequestBus SetTexture

Sets a texture for the fade overlay.


ParameterTypeDescription
textureNameStringThe name of a texture from or to which to fade. To clear the texture, specify an empty string. For more information, see Finding the Texture Name.

ScreenFaderRequestBus SetScreenCoordinates

Sets the screen coordinates where the fade overlay is drawn.


ParameterTypeDescription
screenCoordinatesVector4Sets the screen coordinates (left, top, right, and bottom) where the fade overlay is drawn. The default is full screen (0, 0, 1, 1).

ScreenFaderRequestBus GetCurrentColor

Returns the current color of the fade overlay.

ScreenFaderNotificationBus OnFadeOutComplete

A callback function that is called when fading out is complete.

ScreenFaderNotificationBus OnFadeInComplete

A callback function that is called when fading in is complete.

ScreenFaderManagementRequestBus GetNumFaderIDs

Returns the number of available fader IDs. The number returned is not necessarily the number of faders that have been created.