IN THIS ARTICLE
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
- ScreenFaderRequestBus FadeIn
- ScreenFaderRequestBus SetTexture
- ScreenFaderRequestBus SetScreenCoordinates
- ScreenFaderRequestBus GetCurrentColor
- ScreenFaderNotificationBus OnFadeOutComplete
- ScreenFaderNotificationBus OnFadeInComplete
- ScreenFaderManagementRequestBus GetNumFaderIDs
ScreenFaderRequestBus FadeOut
Triggers fading out to a solid color.
Parameter | Type | Description |
---|---|---|
color | Color | The 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. |
duration | Float | Duration of the fade out in seconds. |
useCurrentColor | Boolean | When 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. |
updateAlways | Boolean | Continues fading even when the game is paused. |
ScreenFaderRequestBus FadeIn
Triggers fading in to a solid color.
Parameter | Type | Description |
---|---|---|
color | Color | The color to fade through. Ignored if Use Current Color is true. |
duration | Float | Duration of the fade in seconds. |
useCurrentColor | Boolean | When true, the transition uses the current color for the fade overlay. When false, the transition begins from the target color. |
updateAlways | Boolean | Continues fading even when the game is paused. |
ScreenFaderRequestBus SetTexture
Sets a texture for the fade overlay.
Parameter | Type | Description |
---|---|---|
textureName | String | The 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.
Parameter | Type | Description |
---|---|---|
screenCoordinates | Vector4 | Sets 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.