Navigation
API > API/Runtime > API/Runtime/Core
A scope block representing an amount of work divided up into sections. Use one scope at the top of each function to give accurate feedback to the user of a slow operation's progress.
Example Usage: void DoSlowWork() { FScopedSlowTask Progress(2.f, LOCTEXT("DoingSlowWork", "Doing Slow Work...")); // Optionally make this show a dialog if not already shown Progress.MakeDialog();
// Indicate that we are entering a frame representing 1 unit of work Progress.EnterProgressFrame(1.f);
// DoFirstThing() can follow a similar pattern of creating a scope divided into frames. These contribute to their parent's progress frame proportionately. DoFirstThing();
Progress.EnterProgressFrame(1.f); DoSecondThing(); }
| Name | FScopedSlowTask |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/ScopedSlowTask.h |
| Include Path | #include "Misc/ScopedSlowTask.h" |
Syntax
struct FScopedSlowTask : public FSlowTask
Inheritance Hierarchy
- FSlowTask → FScopedSlowTask
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScopedSlowTask
(
float InAmountOfWork, |
Construct this scope from an amount of work to do, and a message to display | Misc/ScopedSlowTask.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FScopedSlowTask() |
Misc/ScopedSlowTask.h |