| FSlowTask
|
Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Misc/ScopedSlowTask.h |
Include |
#include "Misc/ScopedSlowTask.h" |
struct FScopedSlowTask : public FSlowTask
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 | Description | |
---|---|---|
|
FScopedSlowTask ( |
Construct this scope from an amount of work to do, and a message to display |
Name | Description | |
---|---|---|
|
~FScopedSlowTask() |