UCommonLoadGuard

The Load Guard behaves similarly to a Border, but with the ability to hide its primary content and display a loading spinner and optional message while needed content is loaded or otherwise prepared.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

CommonUI

Header

/Engine/Plugins/Experimental/CommonUI/Source/CommonUI/Public/CommonLoadGuard.h

Include

#include "CommonLoadGuard.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(Config=Game, defaultconfig)
class UCommonLoadGuard : public UContentWidget

Remarks

The Load Guard behaves similarly to a Border, but with the ability to hide its primary content and display a loading spinner and optional message while needed content is loaded or otherwise prepared.

Use GuardAndLoadAsset to automatically display the loading state until the asset is loaded (then the content widget will be displayed). For other applications (ex: waiting for an async backend call to complete), you can manually set the loading state of the guard.

Variables

Name Description

Protected variable UProperty Category, EditAnywhere

bool

 

bShowLoading

Constructors

Name Description

Public function

UCommonLoadGuard

(
    const FObjectInitializer& Initiali...
)

Functions

Name Description

Public function

void

 

GuardAndLoadAsset

(
    const TSoftObjectPtr< ObjectType > ...,
    TFunction< void> ...
)

Displays the loading spinner until the asset is loaded Will pass a casted pointer to the given asset in the lambda callback - could be nullptr if you provide an incompatible type or invalid asset.

Public function

void

 

GuardAndLoadAsset

(
    const TSoftObjectPtr< UObject >& I...,
    FOnLoadGuardAssetLoaded OnAssetLoad...
)

Public function Const UFunction BlueprintCallable, Category

bool

 

IsLoading()

Public function

FOnLoadGuard...

 

OnLoadingStateChanged()

Public function UFunction BlueprintCallable, Category

void

 

SetIsLoading

(
    bool bInIsLoading
)

Public function UFunction BlueprintCallable, Category

void

 

SetLoadingText

(
    const FText& InLoadingText
)

Overridden from UPanelWidget

Name Description

Public function Virtual Const

UClass *

 

GetSlotClass()

UPanelWidget.

Public function Virtual

void

 

OnSlotAdded

(
    UPanelSlot* NewSlot
)

Public function Virtual

void

 

OnSlotRemoved

(
    UPanelSlot* OldSlot
)

Overridden from UWidget

Name Description

Public function Virtual

const FText

 

GetPaletteCategory()

Gets the palette category of the widget

Public function Virtual

void

 

OnCreationFromPalette()

Called by the palette after constructing a new widget, allows the widget to perform interesting default setup that we don't want to be UObject Defaults.

Protected function Virtual

TSharedRef< ...

 

RebuildWidget()

Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.

Public function Virtual

void

 

SynchronizeProperties()

Applies all properties to the native widget if possible.

Overridden from UVisual

Name Description

Public function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Overridden from UObject

Name Description

Public function Virtual

void

 

PostLoad()

Begin UObject.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Classes

Name

Description

Public class

FOnAssetLoaded

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