UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FWidgetAnimationState Struct Reference

#include <WidgetAnimationState.h>

+ Inheritance diagram for FWidgetAnimationState:

Public Member Functions

 FWidgetAnimationState ()
 
void Initialize (UWidgetAnimation *InAnimation, UUserWidget *InUserWidget)
 
UUserWidgetGetUserWidget () const
 
const UWidgetAnimationGetAnimation () const
 
TSharedPtr< UE::MovieScene::FSharedPlaybackStateGetSharedPlaybackState () const
 
FName GetUserTag () const
 
void SetUserTag (FName InUserTag)
 
bool IsStopping () const
 
bool IsPendingDelete () const
 
FOnWidgetAnimationEventGetOnWidgetAnimationFinished ()
 
UMG_API UUMGSequencePlayerGetOrCreateLegacyPlayer ()
 
UMG_API UUMGSequencePlayerGetLegacyPlayer () const
 
UMG_API FWidgetAnimationHandle GetAnimationHandle () const
 
UMG_API bool IsPlayingForward () const
 
UMG_API EMovieScenePlayerStatus::Type GetPlaybackStatus () const
 
UMG_API void SetPlaybackStatus (EMovieScenePlayerStatus::Type InPlaybackStatus)
 
UMG_API FQualifiedFrameTime GetCurrentTime () const
 
UMG_API void SetCurrentTime (float InTime)
 
UMG_API void SetNumLoopsToPlay (int32 InNumLoopsToPlay)
 
UMG_API void SetPlaybackSpeed (float PlaybackSpeed)
 
UMG_API void Tick (float InDeltaSeconds)
 
UMG_API void Play (const FWidgetAnimationStatePlayParams &PlayParams)
 
UMG_API void Stop ()
 
UMG_API void Pause ()
 
UMG_API void Reverse ()
 
UMG_API void RemoveEvaluationData ()
 
UMG_API void TearDown ()
 
UMG_API bool IsValid () const
 
UMG_API void AddReferencedObjects (FReferenceCollector &Collector)
 
- Public Member Functions inherited from TSharedFromThis< FWidgetAnimationState >
TSharedRef< FWidgetAnimationState, Mode > AsShared ()
 
TSharedRef< FWidgetAnimationState const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FWidgetAnimationState, Mode > AsWeak ()
 
TWeakPtr< FWidgetAnimationState const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Additional Inherited Members

- Protected Member Functions inherited from TSharedFromThis< FWidgetAnimationState >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 
- Static Protected Member Functions inherited from TSharedFromThis< FWidgetAnimationState >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Detailed Description

A class that runs an animation on a widget.

Constructor & Destructor Documentation

◆ FWidgetAnimationState()

FWidgetAnimationState::FWidgetAnimationState ( )

Builds a new widget animation state.

Member Function Documentation

◆ AddReferencedObjects()

void FWidgetAnimationState::AddReferencedObjects ( FReferenceCollector Collector)

Collect objects for the GC.

◆ GetAnimation()

const UWidgetAnimation * FWidgetAnimationState::GetAnimation ( ) const
inline

Gets the current animation being played

◆ GetAnimationHandle()

FWidgetAnimationHandle FWidgetAnimationState::GetAnimationHandle ( ) const

Gets the widget animation handle for the animation being played.

◆ GetCurrentTime()

FQualifiedFrameTime FWidgetAnimationState::GetCurrentTime ( ) const

Gets the current time of the animation.

◆ GetLegacyPlayer()

UUMGSequencePlayer * FWidgetAnimationState::GetLegacyPlayer ( ) const

Gets a legacy player object for backwards compatibility, returning null if none exists yet.

◆ GetOnWidgetAnimationFinished()

FOnWidgetAnimationEvent & FWidgetAnimationState::GetOnWidgetAnimationFinished ( )
inline

Allows registering a callback for when the animation has finished playing.

◆ GetOrCreateLegacyPlayer()

UUMGSequencePlayer * FWidgetAnimationState::GetOrCreateLegacyPlayer ( )

Gets a legacy player object for backwards compatibility, lazily created it if needed.

◆ GetPlaybackStatus()

EMovieScenePlayerStatus::Type FWidgetAnimationState::GetPlaybackStatus ( ) const

Gets the playback status of the animation.

◆ GetSharedPlaybackState()

TSharedPtr< UE::MovieScene::FSharedPlaybackState > FWidgetAnimationState::GetSharedPlaybackState ( ) const
inline

Gets the playback state of the animation being played.

◆ GetUserTag()

FName FWidgetAnimationState::GetUserTag ( ) const
inline

Gets the user tag for the animation.

◆ GetUserWidget()

UUserWidget * FWidgetAnimationState::GetUserWidget ( ) const
inline

Gets the user widget this state is animating.

◆ Initialize()

void FWidgetAnimationState::Initialize ( UWidgetAnimation InAnimation,
UUserWidget InUserWidget 
)

Initializes the widget animation state.

◆ IsPendingDelete()

bool FWidgetAnimationState::IsPendingDelete ( ) const
inline

Returns whether this state is currently pending destruction.

◆ IsPlayingForward()

bool FWidgetAnimationState::IsPlayingForward ( ) const

Gets whether the animation is playing forwards or backwards.

◆ IsStopping()

bool FWidgetAnimationState::IsStopping ( ) const
inline

Returns whether this state is currently stopping.

◆ IsValid()

bool FWidgetAnimationState::IsValid ( ) const

Returns whether this animation is valid. An uninitialized or torn-down state is not valid.

◆ Pause()

void FWidgetAnimationState::Pause ( )

Pauses a running animation.

◆ Play()

void FWidgetAnimationState::Play ( const FWidgetAnimationStatePlayParams PlayParams)

Begins playing or restarts an animation.

◆ RemoveEvaluationData()

void FWidgetAnimationState::RemoveEvaluationData ( )

Disable this sequence player by removing any of its animation data from the entity manager.

◆ Reverse()

void FWidgetAnimationState::Reverse ( )

Reverses a running animation.

◆ SetCurrentTime()

void FWidgetAnimationState::SetCurrentTime ( float  InTime)

Sets the current time of the animation.

◆ SetNumLoopsToPlay()

void FWidgetAnimationState::SetNumLoopsToPlay ( int32  InNumLoopsToPlay)

Sets the number of loops to play.

◆ SetPlaybackSpeed()

void FWidgetAnimationState::SetPlaybackSpeed ( float  PlaybackSpeed)

Sets the animation playback rate.

◆ SetPlaybackStatus()

void FWidgetAnimationState::SetPlaybackStatus ( EMovieScenePlayerStatus::Type  InPlaybackStatus)

Sets the playback status of the animation.

◆ SetUserTag()

void FWidgetAnimationState::SetUserTag ( FName  InUserTag)
inline

Sets the user tag for the animation.

◆ Stop()

void FWidgetAnimationState::Stop ( )

Stops a running animation and resets time.

◆ TearDown()

void FWidgetAnimationState::TearDown ( )

Tears down the animation.

◆ Tick()

void FWidgetAnimationState::Tick ( float  InDeltaSeconds)

Update the animation.


The documentation for this struct was generated from the following files: