Navigation
API > API/Runtime > API/Runtime/UMG
A class that runs an animation on a widget.
| Name | FWidgetAnimationState |
| Type | struct |
| Header File | /Engine/Source/Runtime/UMG/Public/Animation/WidgetAnimationState.h |
| Include Path | #include "Animation/WidgetAnimationState.h" |
Syntax
struct FWidgetAnimationState : public TSharedFromThis< FWidgetAnimationState >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FWidgetAnimationState
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FWidgetAnimationState() |
Builds a new widget animation state. | Animation/WidgetAnimationState.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Animation | TObjectPtr< UWidgetAnimation > | Animation being played | Animation/WidgetAnimationState.h | |
| bIsBeginningPlay | bool | Whether we are in the process of starting play. | Animation/WidgetAnimationState.h | |
| bIsPendingDelete | bool | Whether we have played, stopped, and now waiting to be deleted. | Animation/WidgetAnimationState.h | |
| bIsStopping | bool | Whether we are in the process of stopping. | Animation/WidgetAnimationState.h | |
| BlockedDeltaTimeCompensation | float | Accumulated delta-time we were not able to evaluate with due to ongoing budgeted evaluation. | Animation/WidgetAnimationState.h | |
| bRestoreState | bool | Whether to restore pre-animated state. | Animation/WidgetAnimationState.h | |
| LegacyPlayer | TObjectPtr< UUMGSequencePlayer > | Legacy sequence player for backwards compatibility | Animation/WidgetAnimationState.h | |
| OnWidgetAnimationFinishedEvent | FOnWidgetAnimationEvent | Callback for when the animation has finished playing. | Animation/WidgetAnimationState.h | |
| PlaybackManager | FMovieScenePlaybackManager | Playback manager for the animation. | Animation/WidgetAnimationState.h | |
| PlayMode | EUMGSequencePlayMode::Type | The current playback mode. | Animation/WidgetAnimationState.h | |
| PrivateLinker | TObjectPtr< UMovieSceneEntitySystemLinker > | Private linker for blocking/synchronous running. | Animation/WidgetAnimationState.h | |
| UserTag | FName | The 'state' tag the user may want to use to track what the animation is for. | Animation/WidgetAnimationState.h | |
| WeakPlaybackState | TWeakPtr< UE::MovieScene::FSharedPlaybackState > | Shared playback state for the animation. | Animation/WidgetAnimationState.h | |
| WeakUserWidget | TWeakObjectPtr< UUserWidget > | The user widget this sequence is animating | Animation/WidgetAnimationState.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddReferencedObjects
(
FReferenceCollector& Collector |
Collect objects for the GC. | Animation/WidgetAnimationState.h | |
const UWidgetAnimation * GetAnimation() |
Gets the current animation being played | Animation/WidgetAnimationState.h | |
FWidgetAnimationHandle GetAnimationHandle() |
Gets the widget animation handle for the animation being played. | Animation/WidgetAnimationState.h | |
FQualifiedFrameTime GetCurrentTime() |
Gets the current time of the animation. | Animation/WidgetAnimationState.h | |
UUMGSequencePlayer * GetLegacyPlayer() |
Gets a legacy player object for backwards compatibility, returning null if none exists yet. | Animation/WidgetAnimationState.h | |
FOnWidgetAnimationEvent & GetOnWidgetAnimationFinished() |
Allows registering a callback for when the animation has finished playing. | Animation/WidgetAnimationState.h | |
UUMGSequencePlayer * GetOrCreateLegacyPlayer() |
Gets a legacy player object for backwards compatibility, lazily created it if needed. | Animation/WidgetAnimationState.h | |
EMovieScenePlayerStatus::Type GetPlaybackStatus() |
Gets the playback status of the animation. | Animation/WidgetAnimationState.h | |
TSharedPtr< UE::MovieScene::FSharedPlaybackState > GetSharedPlaybackState() |
Gets the playback state of the animation being played. | Animation/WidgetAnimationState.h | |
FName GetUserTag() |
Gets the user tag for the animation. | Animation/WidgetAnimationState.h | |
UUserWidget * GetUserWidget() |
Gets the user widget this state is animating. | Animation/WidgetAnimationState.h | |
void Initialize
(
UWidgetAnimation* InAnimation, |
Initializes the widget animation state. | Animation/WidgetAnimationState.h | |
bool IsPendingDelete() |
Returns whether this state is currently pending destruction. | Animation/WidgetAnimationState.h | |
bool IsPlayingForward() |
Gets whether the animation is playing forwards or backwards. | Animation/WidgetAnimationState.h | |
bool IsStopping() |
Returns whether this state is currently stopping. | Animation/WidgetAnimationState.h | |
bool IsValid() |
Returns whether this animation is valid. An uninitialized or torn-down state is not valid. | Animation/WidgetAnimationState.h | |
void Pause() |
Pauses a running animation. | Animation/WidgetAnimationState.h | |
void Play
(
const FWidgetAnimationStatePlayParams& PlayParams |
Begins playing or restarts an animation. | Animation/WidgetAnimationState.h | |
void RemoveEvaluationData() |
Disable this sequence player by removing any of its animation data from the entity manager. | Animation/WidgetAnimationState.h | |
void Reverse() |
Reverses a running animation. | Animation/WidgetAnimationState.h | |
void SetCurrentTime
(
float InTime |
Sets the current time of the animation. | Animation/WidgetAnimationState.h | |
void SetNumLoopsToPlay
(
int32 InNumLoopsToPlay |
Sets the number of loops to play. | Animation/WidgetAnimationState.h | |
void SetPlaybackSpeed
(
float PlaybackSpeed |
Sets the animation playback rate. | Animation/WidgetAnimationState.h | |
void SetPlaybackStatus
(
EMovieScenePlayerStatus::Type InPlaybackStatus |
Sets the playback status of the animation. | Animation/WidgetAnimationState.h | |
void SetUserTag
(
FName InUserTag |
Sets the user tag for the animation. | Animation/WidgetAnimationState.h | |
void Stop() |
Stops a running animation and resets time. | Animation/WidgetAnimationState.h | |
void TearDown() |
Tears down the animation. | Animation/WidgetAnimationState.h | |
void Tick
(
float InDeltaSeconds |
Update the animation. | Animation/WidgetAnimationState.h |