![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <CurveSequence.h>
Inheritance diagram for FCurveSequence:Classes | |
| struct | FSlateCurve |
Protected Member Functions | |
| SLATECORE_API void | SetStartTime (double InStartTime) |
Protected Member Functions inherited from TSharedFromThis< FCurveSequence > | |
| TSharedFromThis () | |
| TSharedFromThis (TSharedFromThis const &) | |
| UE_FORCEINLINE_HINT TSharedFromThis & | operator= (TSharedFromThis const &) |
| ~TSharedFromThis () | |
Additional Inherited Members | |
Static Protected Member Functions inherited from TSharedFromThis< FCurveSequence > | |
| static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > | SharedThis (OtherType *ThisPtr) |
| static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > | SharedThis (const OtherType *ThisPtr) |
A sequence of curves that can be used to drive animations for slate widgets. Active timer registration is handled for the widget being animated when calling play.
Each curve within the sequence has a time offset and a duration. This makes FCurveSequence convenient for crating staggered animations. e.g. // We want to zoom in a widget, and then fade in its contents. FCurveHandle ZoomCurve = Sequence.AddCurve( 0, 0.15f ); FCurveHandle FadeCurve = Sequence.AddCurve( 0.15f, 0.1f ); Sequence.Play( this->AsShared() );
| FCurveSequence::FCurveSequence | ( | ) |
Default constructor
| FCurveSequence::~FCurveSequence | ( | ) |
Makes sure the active timer is unregistered
| FCurveSequence::FCurveSequence | ( | const float | InStartTimeSeconds, |
| const float | InDurationSeconds, | ||
| const ECurveEaseFunction | InEaseFunction = ECurveEaseFunction::Linear |
||
| ) |
Construct by adding a single animation curve to this sequence. Does not provide access to the curve though.
| InStartTimeSeconds | When to start this curve. |
| InDurationSeconds | How long this curve lasts. |
| InEaseFunction | Easing function to use for this curve. Defaults to Linear. Use this to smooth out your animation transitions. |
| FCurveHandle FCurveSequence::AddCurve | ( | const float | InStartTimeSeconds, |
| const float | InDurationSeconds, | ||
| const ECurveEaseFunction | InEaseFunction = ECurveEaseFunction::Linear |
||
| ) |
Add a new curve at a given time and offset.
| InStartTimeSeconds | When to start this curve. |
| InDurationSeconds | How long this curve lasts. |
| InEaseFunction | Easing function to use for this curve. Defaults to Linear. Use this to smooth out your animation transitions. |
| FCurveHandle FCurveSequence::AddCurveRelative | ( | const float | InOffset, |
| const float | InDurationSecond, | ||
| const ECurveEaseFunction | InEaseFunction = ECurveEaseFunction::Linear |
||
| ) |
Add a new curve relative to the current end of the sequence. Makes stacking easier. e.g. doing AddCurveRelative(0,5); AddCurveRelative(0,3); Is equivalent to AddCurve(0,5); AddCurve(5,3)
| InOffset | Offset from the last curve in the sequence. |
| InDurationSecond | How long this curve lasts. |
| InEaseFunction | Easing function to use for this curve. Defaults to Linear. Use this to smooth out your animation transitions. |
| const FCurveSequence::FSlateCurve & FCurveSequence::GetCurve | ( | int32 | CurveIndex | ) | const |
| CurveIndex | Index of a curve in the curves array. |
| float FCurveSequence::GetLerp | ( | ) | const |
For single-curve animations, returns the interpolation alpha for the animation. If you call this function on a sequence with multiple curves, an assertion will trigger.
| float FCurveSequence::GetSequenceTime | ( | ) | const |
| bool FCurveSequence::IsAtEnd | ( | ) | const |
Is the sequence at the end?
| bool FCurveSequence::IsAtStart | ( | ) | const |
Is the sequence at the start?
| bool FCurveSequence::IsForward | ( | ) | const |
| bool FCurveSequence::IsInReverse | ( | ) | const |
| bool FCurveSequence::IsLooping | ( | ) | const |
Is the sequence looping?
| bool FCurveSequence::IsPlaying | ( | ) | const |
Checks whether the sequence is currently playing.
| void FCurveSequence::JumpToEnd | ( | ) |
Jumps immediately to the end of the animation sequence
| void FCurveSequence::JumpToStart | ( | ) |
Jumps immediately to the beginning of the animation sequence
| void FCurveSequence::Pause | ( | ) |
Pause this curve sequence.
| void FCurveSequence::Play | ( | const FTickerDelegate & | InDelegate, |
| bool | bPlayLooped = false, |
||
| const float | StartAtTime = 0.0f |
||
| ) |
Plays the curve sequence for a ticker, rather than a widget.
| void FCurveSequence::Play | ( | const TSharedRef< SWidget > & | InOwnerWidget, |
| bool | bPlayLooped = false, |
||
| const float | StartAtTime = 0.0f, |
||
| bool | bRequiresActiveTimer = true |
||
| ) |
Start playing this curve sequence. Registers an active timer with the widget being animated.
| InOwnerWidget | The widget that is being animated by this sequence. |
| bPlayLooped | True if the curve sequence should play continually on a loop. Note that the active timer will persist until this sequence is paused or jumped to the start/end. |
| StartAtTime | The relative time within the animation at which to begin playing (i.e. 0.0f is the beginning). |
| bRequiresActiveTimer | Whether or not we need to register an active timer on the widget to keep slate ticking while the animation is playing. If that is not necessary in your use case, you can set it to false for a small performance boost |
| void FCurveSequence::PlayRelative | ( | const TSharedRef< SWidget > & | InOwnerWidget, |
| bool | bForward | ||
| ) |
Plays forward if it can, otherwise holds it at the end of the animation, if we play in reverse it will reverse the animation if it can
| void FCurveSequence::PlayReverse | ( | const TSharedRef< SWidget > & | InOwnerWidget, |
| bool | bPlayLooped = false, |
||
| const float | StartAtTime = 0.0f, |
||
| bool | bRequiresActiveTimer = true |
||
| ) |
Start playing this curve sequence in reverse. Registers an active timer for the widget using the sequence.
| InOwnerWidget | The widget that is being animated by this sequence. |
| bPlayLooped | True if the curve sequence should play continually on a loop. Note that the active timer will persist until this sequence is paused or jumped to the start/end. |
| StartAtTime | The relative time within the animation at which to begin playing (i.e. 0.0f is the beginning). |
| bRequiresActiveTimer | Whether or not we need to register an active timer on the widget to keep slate ticking while the animation is playing. If that is not necessary in your use case, you can set it to false for a small performance boost |
| void FCurveSequence::Resume | ( | ) |
Unpause this curve sequence to resume play.
| void FCurveSequence::Reverse | ( | ) |
Reverse the direction of an in-progress animation
| InStartTime | when this curve sequence started playing |