Navigation
API > API/Runtime > API/Runtime/Core
Data type used to store information about a currently running slow task. Direct use is not advised, use FScopedSlowTask instead
| Name | FSlowTask |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/SlowTask.h |
| Include Path | #include "Misc/SlowTask.h" |
Syntax
struct FSlowTask
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Prevent copying | Misc/SlowTask.h | ||
FSlowTask
(
float InAmountOfWork, |
Construct this scope from an amount of work to do, and a message to display | Misc/SlowTask.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CompletedWork | float | The amount of work we have already completed in this scope | Misc/SlowTask.h | |
| CurrentFrameScope | float | The amount of work the current frame is responsible for | Misc/SlowTask.h | |
| DefaultMessage | FText | Default message to display to the user when not overridden by a frame | Misc/SlowTask.h | |
| FrameMessage | FText | Message pertaining to the current frame's work | Misc/SlowTask.h | |
| OpenDialogThreshold | TOptional< float > | Threshold before dialog is opened | Misc/SlowTask.h | |
| StartTime | double | The time that this scope was created | Misc/SlowTask.h | |
| TotalAmountOfWork | float | The amount of work to do in this scope | Misc/SlowTask.h | |
| Visibility | ESlowTaskVisibility | The visibility of this slow task | Misc/SlowTask.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCreatedDialog | bool | Flag that specifies whether this feedback scope created a new slow task dialog | Misc/SlowTask.h | |
| bDelayedDialogAllowInPIE | bool | Specify whether the delayed dialog is allowed in PIE | Misc/SlowTask.h | |
| bDelayedDialogShowCancelButton | bool | Specify whether the delayed dialog should show a cancel button | Misc/SlowTask.h | |
| bEnabled | bool | Boolean flag to control whether this scope actually does anything (unset for quiet operations etc) | Misc/SlowTask.h | |
| bSkipRecursiveDialogCreation | bool | Avoid calling hierarchical dialog creation if not required | Misc/SlowTask.h | |
| Context | FFeedbackContext & | The feedback context that we belong to | Misc/SlowTask.h | |
| RegionId | uint64 | Id of the traced timing region | Misc/SlowTask.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Destroy() |
Function that finishes any remaining work and removes itself from the global scope stack | Misc/SlowTask.h | |
void EnterProgressFrame
(
float ExpectedWorkThisFrame, |
Indicate that we are to enter a frame that will take up the specified amount of work. | Misc/SlowTask.h | |
void ForceRefresh () |
Whenever we encounter edge condition requiring to force a UI refresh (Like if another popup would show when the slow task finishes and you want it to show 100%) | Misc/SlowTask.h | |
const FText & GetCurrentMessage() |
Get the frame message or default message if empty | Misc/SlowTask.h | |
void Initialize() |
Function that initializes the scope by adding it to its context's stack | Misc/SlowTask.h | |
void MakeDialog
(
bool bShowCancelButton, |
Creates a new dialog for this slow task, if there is currently not one open | Misc/SlowTask.h | |
void MakeDialogDelayed
(
float Threshold, |
Creates a new dialog for this slow task after the given time threshold. | Misc/SlowTask.h | |
bool ShouldCancel() |
True if the user has requested that the slow task be canceled | Misc/SlowTask.h | |
void TickProgress () |
Let the UI refresh but doesn't advance progress. | Misc/SlowTask.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void ForceRefresh
(
FFeedbackContext& Context |
Whenever we encounter edge condition requiring to force a UI refresh | Misc/SlowTask.h | |
static bool ShouldCreateThrottledSlowTask () |
True if a slow task should be created. | Misc/SlowTask.h |