![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ProgressCancel.h>
Classes | |
| struct | FMessageInfo |
| class | FProgressScope |
Public Types | |
| enum class | EMessageLevel { Internal = 0 , UserMessage = 1 , UserNotification = 2 , UserWarning = 3 , UserError = 4 } |
Public Member Functions | |
| void | SetMaxMessageDepth (int32 ScopeDepth) |
| void | ClearMaxMessageDepth () |
| bool | Cancelled () |
| float | GetProgress () const |
| FText | GetProgressMessage () const |
| void | SetProgressMessage (const FText &Message) |
| void | AdvanceCurrentScopeProgressBy (float Amount) |
| void | AdvanceCurrentScopeProgressToward (float TargetProgressFrac, float FractionToward) |
| float | GetCurrentScopeProgress () |
| float | GetCurrentScopeDistanceTo (float TargetProgressFrac) |
| void | SetCurrentScopeProgressTo (float NewProgressFrac) |
| void | AddWarning (const FText &MessageText, EMessageLevel MessageLevel) |
Static Public Member Functions | |
| static GEOMETRYCORE_API FProgressScope | CreateScopeTo (FProgressCancel *ProgressCancel, float ProgressTo, const FText &Message=FText()) |
Public Attributes | |
| TFunction< bool()> | CancelF = []() { return false; } |
| TArray< FMessageInfo > | Warnings |
Friends | |
| class | FProgressScope |
FProgressCancel is intended to be passed to long-running computes to do two things: 1) provide progress info back to caller 2) allow caller to cancel the computation
|
strong |
|
inline |
| Amount | Amount to increase the progress fraction, as a fraction of the current active progress range |
|
inline |
Advance current progress a fraction of the way toward a target value For example: if progress is .5, AdvanceProgressToward(1, .5) will take a half step to 1 and set progress to .75 As with all public progress function, progress is expressed relative to the current active progress range and cannot go backward.
|
inline |
|
inline |
|
static |
| ProgressCancel | Progress will be tracked on this. If null, the FProgressScope will do nothing. |
| ProgressTo | Target value to increase progress to w/in this scope (as a fraction of the current outer-scope active progress range) |
| Message | Optional message describing the work to be done |
| TargetProgressFrac | Target progress value as a fraction of the current scope's active progress range |
|
inline |
|
inline |
|
inline |
Note: This function will leave the current progress unchanged if the target value is less than the current progress – it will not allow the progress value to go backward.
| ProgressFrac | Value to set current progress to, as a fraction of the current active progress range |
|
friend |
| TArray<FMessageInfo> FProgressCancel::Warnings |