FScopedSlowTask

A scope block representing an amount of work divided up into sections.

Windows
MacOS
Linux

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

Name Description

Public function

FScopedSlowTask

(
    float InAmountOfWork,
    const FText& InDefaultMessage,
    bool bInEnabled,
    FFeedbackContext& InContext
)

Construct this scope from an amount of work to do, and a message to display

Destructors

Name Description

Public function

~FScopedSlowTask()

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss