![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <StreamableManager.h>
Inheritance diagram for FStreamableHandle:Static Public Member Functions | |
| static ENGINE_API void | ExecuteDelegate (const FStreamableDelegateWithHandle &Delegate, TSharedPtr< FStreamableHandle > AssociatedHandle=nullptr, const FStreamableDelegateWithHandle &CancelDelegate=FStreamableDelegateWithHandle()) |
| static ENGINE_API void | ExecuteDelegate (FStreamableDelegateWithHandle &&Delegate, TSharedPtr< FStreamableHandle > AssociatedHandle=nullptr, FStreamableDelegateWithHandle &&CancelDelegate=FStreamableDelegateWithHandle()) |
| static ENGINE_API void | ExecuteDelegate (const FStreamableDelegate &Delegate, TSharedPtr< FStreamableHandle > AssociatedHandle=nullptr, const FStreamableDelegate &CancelDelegate=FStreamableDelegate()) |
| static ENGINE_API void | ExecuteDelegate (FStreamableDelegate &&Delegate, TSharedPtr< FStreamableHandle > AssociatedHandle=nullptr, FStreamableDelegate &&CancelDelegate=FStreamableDelegate()) |
Static Public Attributes | |
| static ENGINE_API const FString | HandleDebugName_Preloading = FString(TEXT("Preloading")) |
| static ENGINE_API const FString | HandleDebugName_AssetList = FString(TEXT("LoadAssetList")) |
| static ENGINE_API const FString | HandleDebugName_CombinedHandle = FString(TEXT("CreateCombinedHandle")) |
| static ENGINE_API const FString | HandleDebugName_Error = FString(TEXT("CreateErrorHandle")) |
Friends | |
| struct | FStreamableManager |
| struct | FStreamable |
| struct | UE::StreamableManager::Private::FDownloadContext |
Additional Inherited Members | |
Protected Member Functions inherited from TSharedFromThis< FStreamableHandle > | |
| TSharedFromThis () | |
| TSharedFromThis (TSharedFromThis const &) | |
| UE_FORCEINLINE_HINT TSharedFromThis & | operator= (TSharedFromThis const &) |
| ~TSharedFromThis () | |
Static Protected Member Functions inherited from TSharedFromThis< FStreamableHandle > | |
| static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > | SharedThis (OtherType *ThisPtr) |
| static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > | SharedThis (const OtherType *ThisPtr) |
A handle to a synchronous or async load. As long as the handle is Active, loaded assets will stay in memory
|
explicit |
| FStreamableHandle::~FStreamableHandle | ( | ) |
Destructor
|
delete |
Not safe to copy or duplicate
|
inline |
Unconditionally adds a contextual data struct to this handle. Uniqueness is not enforced.
| bool FStreamableHandle::BindCancelDelegate | ( | FStreamableDelegate | NewDelegate | ) |
| bool FStreamableHandle::BindCancelDelegate | ( | FStreamableDelegateWithHandle | NewDelegate | ) |
Bind delegate that is called if handle is canceled, only works if loading is in progress. This will overwrite any already bound delegate!
| bool FStreamableHandle::BindCompleteDelegate | ( | FStreamableDelegate | NewDelegate | ) |
| bool FStreamableHandle::BindCompleteDelegate | ( | FStreamableDelegateWithHandle | NewDelegate | ) |
Bind delegate that is called when load completes, only works if loading is in progress. This will overwrite any already bound delegate!
| bool FStreamableHandle::BindUpdateDelegate | ( | FStreamableUpdateDelegate | NewDelegate | ) |
Bind delegate that is called periodically as request updates, only works if loading is in progress. This will overwrite any already bound delegate!
| void FStreamableHandle::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
| TSharedPtr< FStreamableHandle > FStreamableHandle::CreateCombinedHandle | ( | const TConstArrayView< TSharedPtr< FStreamableHandle > > & | OtherHandles | ) |
Creates a new merged handle which contains this handle as well as any external handles. No delegates are moved, and the new handle is returned for convenience. Parent handles no longer directly track this, but will be correctly linked with the newly merged handle (and this handle is a child of the merged hande).
| OtherHandles | Container of handles which should be merged with this handle |
|
static |
Calls a StreamableDelegate, this will add to the delayed callback queue depending on s.StreamableDelegateDelayFrames
| Delegate | Primary delegate to execute |
| AssociatedHandle | Streamable handle associated with this delegate, may be null |
| CancelDelegate | If handle gets cancelled before primary delegate executes, this delegate will be called instead |
|
static |
Calls a StreamableDelegate, this will add to the delayed callback queue depending on s.StreamableDelegateDelayFrames
| Delegate | Primary delegate to execute |
| AssociatedHandle | Streamable handle associated with this delegate, may be null |
| CancelDelegate | If handle gets cancelled before primary delegate executes, this delegate will be called instead |
|
static |
Overload taking the Delegate by rvalue. Using this will prevent any copies of FStreamableDelegate from being made if the callback is deferred.
|
static |
Overload taking the Delegate by rvalue. Using this will prevent any copies of FStreamableDelegate from being made if the callback is deferred.
|
inline |
Finds the first instance of a contextual data struct which is attached to this handle.
| TSharedPtr< FStreamableHandle > FStreamableHandle::FindMatchingHandle | ( | TFunction< bool(const FStreamableHandle &)> | Predicate | ) | const |
Return a TSharedPtr of the first handle among this and descendants which satisfies the predicate.
| Predicate | Conditional applied to each candidate handle |
|
inline |
Gives you a mutable reference to a contextual data struct of the specified type.
Invokes a callable for each loaded asset if load has succeeded. Some entries will be null if loading failed
| Callable | Callable object |
|
inline |
Returns progress as a value between 0.0 and 1.0 representing the total percentage of installed packages for the request.
|
inline |
Finds all instances of a contextual data struct which are attached to this handle
|
inline |
Returns the debug name for this handle.
|
inline |
Get download cache pin for this handle
| TArray< FStreamableDownloadCachePin > FStreamableHandle::GetDownloadCachePins | ( | ) | const |
Get download cache pins for this handle and all childern
| TOptional< FStreamableDownloadPriority > FStreamableHandle::GetDownloadPriority | ( | ) | const |
Returns download priority. Only valid if a download has been requested and is not yet complete.
|
inline |
Get error details
| UObject * FStreamableHandle::GetLoadedAsset | ( | ) | const |
Returns first asset in requested asset list, if it's been successfully loaded. This will fail if the asset failed to load
|
inline |
Templated version of above
|
inline |
Templated version of above. Entries that fail to cast will also be null.
Adds all loaded assets if load has succeeded. Some entries will be null if loading failed
Returns number of assets that have completed loading out of initial list, failed loads will count as loaded
|
inline |
Returns progress as a value between 0.0 and 1.0.
| TSharedPtr< FStreamableHandle > FStreamableHandle::GetOutermostHandle | ( | ) |
Crawls out to the outermost handle and returns it. Since we could have multiple Parent handles, we might have a tie. In cases of a tie, the eldest parent handle (so, lower indices) will win.
| FStreamableManager * FStreamableHandle::GetOwningManager | ( | ) | const |
Get the StreamableManager for this handle
|
inline |
Returns the streaming priority.
| float FStreamableHandle::GetProgress | ( | EStreamableProgressType | Type = EStreamableProgressType::Load | ) | const |
Returns progress as a value between 0.0 and 1.0.
|
inline |
Returns progress as a value between 0.0 and 1.0 representing progress of downloading packages that were not installed when the request was issued.
| void FStreamableHandle::GetRequestedAssets | ( | TArray< FSoftObjectPath > & | AssetList, |
| bool | bIncludeChildren = true |
||
| ) | const |
Gets list of assets references this load was started with. This will be the paths before redirectors, and not all of these are guaranteed to be loaded
| AssetList | Output array for requested assets. Array is Reset before adding values. |
| bIncludeChildren | Whether the child handles should be included in the search. |
| bool FStreamableHandle::HasCancelDelegate | ( | ) | const |
Check to see whether or not the Cancel delegate is bound; useful for doing extra work before/without stomping the existing delegate.
| bool FStreamableHandle::HasCompleteDelegate | ( | ) | const |
Check to see whether or not the Complete delegate is bound; useful for doing extra work before/without stomping the existing delegate.
|
inline |
True if an error occured
|
inline |
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
| bool FStreamableHandle::HasLoadCompletedOrStalled | ( | ) | const |
Returns true if we've done all the loading we can now, ie all handles are either completed or stalled
| bool FStreamableHandle::HasUpdateDelegate | ( | ) | const |
Check to see whether or not the Update delegate is bound; useful for doing extra work before/without stomping the existing delegate.
|
inline |
If this handle is still active, meaning it wasn't canceled or released
|
inline |
Returns true if this is a combined handle that depends on child handles.
|
inline |
True if load is still ongoing and we haven't been cancelled
|
inline |
If this handle is stalled and waiting for another event to occur before it is actually requested
|
delete |
| void FStreamableHandle::ReleaseHandle | ( | ) |
Release this handle. This can be called from normal gameplay code to indicate that the loaded assets are no longer needed This will be called implicitly if all shared pointers to this handle are destroyed If called before the completion delegate, the release will be delayed until after completion
| void FStreamableHandle::SetDebugNameIfEmptyOrDefault | ( | const FString & | NewName | ) |
Allows user code to provide a more detailed name in the cases where a name is autogenerated or otherwise default.
| bool FStreamableHandle::SetDownloadPriority | ( | FStreamableDownloadPriority | Priority | ) |
Set download priority. Only valid if a download has been requested and is not yet complete.
| void FStreamableHandle::StartStalledHandle | ( | ) |
Tells a stalled handle to start its actual request.
| EAsyncPackageState::Type FStreamableHandle::WaitUntilComplete | ( | float | Timeout = 0.0f, |
| bool | bStartStalledHandles = true |
||
| ) |
Blocks until the requested assets have loaded. This pushes the requested asset to the top of the priority list, but does not flush all async loading, usually resulting in faster completion than a LoadObject call
| Timeout | Maximum time to wait, if this is 0 it will wait forever |
| StartStalledHandles | If true it will force all handles waiting on external resources to try and load right now |
|
inline |
If this request was cancelled. Assets may still have been loaded, but completion delegate was not called
|
friend |
|
friend |
|
static |
|
static |
|
static |
|
static |