FStreamableHandle

A handle to a synchronous or async load.

Windows
MacOS
Linux

Inheritance Hierarchy

TSharedFromThis

FStreamableHandle

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/StreamableManager.h

Include

#include "Engine/StreamableManager.h"

Syntax

struct FStreamableHandle : public TSharedFromThis< FStreamableHandle, ESPMode::Fast >

Remarks

A handle to a synchronous or async load. As long as the handle is Active, loaded assets will stay in memory

Constructors

Name Description

Public function

FStreamableHandle

(
    const FStreamableHandle&
)

Not safe to copy or duplicate

Destructors

Name Description

Public function

~FStreamableHandle()

Destructor

Functions

Name Description

Public function

bool

 

BindCancelDelegate

(
    FStreamableDelegate NewDelegate
)

Bind delegate that is called if handle is canceled, only works if loading is in progress.

Public function

bool

 

BindCompleteDelegate

(
    FStreamableDelegate NewDelegate
)

Bind delegate that is called when load completes, only works if loading is in progress.

Public function

bool

 

BindUpdateDelegate

(
    FStreamableUpdateDelegate NewDelega...
)

Bind delegate that is called periodically as delegate updates, only works if loading is in progress.

Public function

void

 

CancelHandle()

Cancel a request, callable from within the manager or externally This will immediately release the handle even if it is still in progress, and call the cancel callback if bound This stops the completion callback from happening, even if it is in the delayed callback queue

Public function Static

void

 

ExecuteDelegate

(
    const FStreamableDelegate& Delegat...,
    TSharedPtr< FStreamableHandle > Ass...,
    const FStreamableDelegate& CancelD...
)

Calls a StreamableDelegate, this will add to the delayed callback queue depending on s.StreamableDelegateDelayFrames

Public function Const

const FStrin...

 

GetDebugName()

Returns the debug name for this handle.

Public function Const

UObject *...

 

GetLoadedAsset()

Returns first asset in requested asset list, if it's been successfully loaded.

Public function Const

void

 

GetLoadedAssets

(
    TArray< UObject* >& LoadedAss...
)

Adds all loaded assets if load has succeeded. Some entries will be null if loading failed

Public function Const

void

 

GetLoadedCount

(
    int32& LoadedCount,
    int32& RequestedCount
)

Returns number of assets that have completed loading out of initial list, failed loads will count as loaded

Public function Const

FStreamableM...

 

GetOwningManager()

Get the StreamableManager for this handle

Public function Const

TAsyncLoadPr...

 

GetPriority()

Returns the streaming priority.

Public function Const

float

 

GetProgress()

Returns progress as a value between 0.0 and 1.0.

Public function Const

void

 

GetRequestedAssets

(
    TArray< FSoftObjectPath >& AssetLi...
)

Gets list of assets references this load was started with.

Public function Const

bool

 

HasLoadCompleted()

If this request has finished loading, meaning all available assets were loaded Any assets that failed to load will still be null This can be true before the completion callback has happened as it may be in the delayed callback queue

Public function Const

bool

 

HasLoadCompletedOrStalled()

Returns true if we've done all the loading we can now, ie all handles are either completed or stalled

Public function Const

bool

 

IsActive()

If this handle is still active, meaning it wasn't canceled or released

Public function Const

bool

 

IsCombinedHandle()

Returns true if this is a combined handle that depends on child handles.

Public function Const

bool

 

IsLoadingInProgress()

True if load is still ongoing and we haven't been cancelled

Public function Const

bool

 

IsStalled()

If this handle is stalled and waiting for another event to occur before it is actually requested

Public function

void

 

ReleaseHandle()

Release this handle.

Public function

void

 

StartStalledHandle()

Tells a stalled handle to start its actual request.

Public function

EAsyncPackag...

 

WaitUntilComplete

(
    float Timeout,
    bool bStartStalledHandles
)

Blocks until the requested assets have loaded.

Public function Const

bool

 

WasCanceled()

If this request was cancelled.

Operators

Name Description

Public function

FStreamableH...

 

operator=

(
    const FStreamableHandle&
)

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