Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 2.35 KB

File metadata and controls

75 lines (52 loc) · 2.35 KB

Editor Task Library

Progress and notification nodes for editor scripts.

Module: DirectiveUtilitiesEditor (Editor)  |  Header: Source/DirectiveUtilitiesEditor/Public/Libraries/DirectiveUtilEditorTaskLibrary.h


Start Editor Slow Task

Type: Blueprint Callable  |  Category: Directive Utilities|Editor|Task

static UDirectiveUtilEditorSlowTask* StartEditorSlowTask(
    float TotalWork,
    const FText& Description,
    bool bCanCancel = false);

Opens an editor progress dialog and returns its task object. Invalid totals and attempts to start a second task return null.

Parameter Type Description
TotalWork float The total amount of work represented by the task.
Description FText The text shown when the task starts.
bCanCancel bool Shows a cancel button when enabled.

Store the returned object until the work finishes. Destroying an active task closes its dialog.

Advance

Type: Blueprint Callable  |  Category: Directive Utilities|Editor|Task

bool Advance(float Work, const FText& Message);

Advances the task and updates its message. Returns false after the task is finished or when Work is negative.

Is Cancel Requested

Type: Blueprint Pure  |  Category: Directive Utilities|Editor|Task

bool IsCancelRequested() const;

Returns true after the user presses the task's cancel button. The caller decides when to stop its work.

Is Active

Type: Blueprint Pure  |  Category: Directive Utilities|Editor|Task

bool IsActive() const;

Returns true until Finish runs or the task object is destroyed.

Finish

Type: Blueprint Callable  |  Category: Directive Utilities|Editor|Task

void Finish();

Closes the progress task. Calling it more than once is safe.

Show Editor Notification

Type: Blueprint Callable  |  Category: Directive Utilities|Editor|Notification

static bool ShowEditorNotification(
    const FText& Message,
    EDirectiveUtilEditorNotificationState State,
    float ExpireDuration = 3.0f);

Displays a neutral, success, warning, or failure notification. Returns false when Slate is unavailable or the notification could not be created. Negative lifetimes are treated as zero.