Navigation
Unreal Engine C++ API Reference > Runtime > Core > Misc
Inheritance Hierarchy
- FSlowTask
- FScopedSlowTask
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/Misc/ScopedSlowTask.h |
Include | #include "Misc/ScopedSlowTask.h" |
Syntax
struct FScopedSlowTask : public FSlowTask
Remarks
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(); }
Constructors
Type | Name | Description | |
---|---|---|---|
FScopedSlowTask
(
float InAmountOfWork, |
Construct this scope from an amount of work to do, and a message to display |
Destructors
Type | Name | Description | |
---|---|---|---|