Navigation
API > API/Runtime > API/Runtime/Engine
Alpha Blend class that supports different blend options as well as custom curves
| Name | FAlphaBlend |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/AlphaBlend.h |
| Include Path | #include "AlphaBlend.h" |
Syntax
USTRUCT (BlueprintType )
struct FAlphaBlend
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAlphaBlend
(
float NewBlendTime |
Constructor | AlphaBlend.h | |
FAlphaBlend
(
const FAlphaBlendArgs& InArgs |
Constructor | AlphaBlend.h | |
FAlphaBlend
(
const FAlphaBlend& Other, |
Constructor | AlphaBlend.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AlphaBlend | float | Resulting Alpha value, between 0.f and 1.f | AlphaBlend.h | |
| AlphaLerp | float | Internal Lerped value for Alpha | AlphaBlend.h | |
| BeginValue | float | The Start value. It is 'from' range | AlphaBlend.h | |
| BlendedValue | float | The current blended value derived from the begin and desired values. | AlphaBlend.h | |
| BlendOption | EAlphaBlendOption | Please note that changing this variable would get applied in the NEXT UPDATE. | AlphaBlend.h |
|
| BlendTime | float | Blend Time | AlphaBlend.h |
|
| BlendTimeRemaining | float | Time left to reach target | AlphaBlend.h | |
| bNeedsToResetAlpha | bool | Internal flag to reset the alpha value | AlphaBlend.h | |
| bNeedsToResetBlendTime | bool | Internal flat to reset blend time. | AlphaBlend.h | |
| bNeedsToResetCachedDesiredBlendedValue | bool | AlphaBlend.h | ||
| CachedDesiredBlendedValue | float | Cached Desired Value with Alpha 1 so that we can check if reached or not | AlphaBlend.h | |
| CustomCurve | TObjectPtr< UCurveFloat > | Please note that changing this variable would get applied in the NEXT UPDATE. | AlphaBlend.h |
|
| DesiredValue | float | The Target value. It is 'to' range | AlphaBlend.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float GetAlpha() |
Gets the current 0..1 alpha value. Changed to AlphaLerp to match with SetAlpha function | AlphaBlend.h | |
float GetBeginValue() |
Get the current begin value | AlphaBlend.h | |
float GetBlendedValue() |
Gets the current blended value | AlphaBlend.h | |
EAlphaBlendOption GetBlendOption() |
AlphaBlend.h | ||
float GetBlendTime() |
Getters | AlphaBlend.h | |
float GetBlendTimeRemaining() |
AlphaBlend.h | ||
UCurveFloat * GetCustomCurve() |
AlphaBlend.h | ||
float GetDesiredValue() |
Get the current desired value | AlphaBlend.h | |
bool IsComplete() |
Gets whether or not the blend is complete | AlphaBlend.h | |
void Reset () |
Reset functions - | AlphaBlend.h | |
void ResetAlpha() |
Reset alpha, this keeps current BlendedValue but modify Alpha to keep the blending state. | AlphaBlend.h | |
bool Serialize
(
FStructuredArchive::FSlot Slot |
AlphaBlend.h | ||
| AlphaBlend.h | |||
void SetAlpha
(
float InAlpha |
Sets the Lerp alpha value directly. | AlphaBlend.h | |
void SetBlendOption
(
EAlphaBlendOption InBlendOption |
Setters - need to refresh cached value | AlphaBlend.h | |
void SetBlendTime
(
float InBlendTime |
Update transition blend time. This new value will be applied in the next Update. | AlphaBlend.h | |
void SetCustomCurve
(
UCurveFloat* InCustomCurve |
AlphaBlend.h | ||
void SetDesiredValue
(
float InDesired |
Sets the final desired value for the blended value | AlphaBlend.h | |
void SetValueRange
(
float Begin, |
Sets the range of values to map to the interpolation | AlphaBlend.h | |
float Update
(
float InDeltaTime |
Update interpolation, has to be called once every frame. | AlphaBlend.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static float AlphaToBlendOption
(
float InAlpha, |
Converts InAlpha from a linear 0...1 value into the output alpha described by InBlendOption | AlphaBlend.h |