UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FStreamableManager Struct Reference

#include <StreamableManager.h>

+ Inheritance diagram for FStreamableManager:

Public Member Functions

template<typename PathContainerType = TArray<FSoftObjectPath>, typename FuncType = FStreamableDelegateWithHandle, typename = std::enable_if_t<!std::is_same_v<std::decay_t<PathContainerType>, FStreamableAsyncLoadParams>, void>>
TSharedPtr< FStreamableHandleRequestAsyncLoad (PathContainerType &&TargetsToStream, FuncType &&DelegateToCall=FStreamableDelegateWithHandle(), TAsyncLoadPriority Priority=DefaultAsyncLoadPriority, bool bManageActiveHandle=false, bool bStartStalled=false, FString DebugName=FString(), UE::FSourceLocation Location=UE::FSourceLocation::Current())
 
ENGINE_API TSharedPtr< FStreamableHandleRequestAsyncLoad (FStreamableAsyncLoadParams &&Params, FString DebugName=FString(), UE::FSourceLocation Location=UE::FSourceLocation::Current())
 
template<typename PathContainerType = TArray<FSoftObjectPath>>
TSharedPtr< FStreamableHandleRequestSyncLoad (PathContainerType &&TargetsToStream, bool bManageActiveHandle=false, FString DebugName=FString(), UE::FSourceLocation Location=UE::FSourceLocation::Current())
 
ENGINE_API UObjectLoadSynchronous (const FSoftObjectPath &Target, bool bManageActiveHandle=false, TSharedPtr< FStreamableHandle > *RequestHandlePointer=nullptr, UE::FSourceLocation Location=UE::FSourceLocation::Current())
 
template<typename T >
T * LoadSynchronous (const FSoftObjectPath &Target, bool bManageActiveHandle=false, TSharedPtr< FStreamableHandle > *RequestHandlePointer=nullptr, UE::FSourceLocation Location=UE::FSourceLocation::Current())
 
template<typename T >
T * LoadSynchronous (const TSoftObjectPtr< T > &Target, bool bManageActiveHandle=false, TSharedPtr< FStreamableHandle > *RequestHandlePointer=nullptr, UE::FSourceLocation Location=UE::FSourceLocation::Current())
 
template<typename T >
TSubclassOf< T > LoadSynchronous (const TSoftClassPtr< T > &Target, bool bManageActiveHandle=false, TSharedPtr< FStreamableHandle > *RequestHandlePointer=nullptr, UE::FSourceLocation Location=UE::FSourceLocation::Current())
 
ENGINE_API TSharedPtr< FStreamableHandleCreateCombinedHandle (TConstArrayView< TSharedPtr< FStreamableHandle > > ChildHandles, FString DebugName=FStreamableHandle::HandleDebugName_CombinedHandle, EStreamableManagerCombinedHandleOptions Options=EStreamableManagerCombinedHandleOptions::None, FStreamableAsyncLoadParams &&Params=FStreamableAsyncLoadParams{}, UE::FSourceLocation Location=UE::FSourceLocation::Current())
 
ENGINE_API TSharedPtr< FStreamableHandleCreateErrorHandle (UE::UnifiedError::FError &&Error, FStreamableAsyncLoadParams &&Params, FString DebugName=FStreamableHandle::HandleDebugName_CombinedHandle, UE::FSourceLocation Location=UE::FSourceLocation::Current())
 
ENGINE_API bool GetActiveHandles (const FSoftObjectPath &Target, TArray< TSharedRef< FStreamableHandle > > &HandleList, bool bOnlyManagedHandles=false) const
 
ENGINE_API bool AreAllAsyncLoadsComplete () const
 
ENGINE_API bool IsAsyncLoadComplete (const FSoftObjectPath &Target) const
 
ENGINE_API void Unload (const FSoftObjectPath &Target)
 
ENGINE_API FSoftObjectPath ResolveRedirects (const FSoftObjectPath &Target) const
 
ENGINE_API const FString & GetManagerName () const
 
ENGINE_API void SetManagerName (FString InName)
 
virtual ENGINE_API void AddReferencedObjects (FReferenceCollector &Collector) override
 
virtual FString GetReferencerName () const override
 
virtual ENGINE_API bool GetReferencerPropertyName (UObject *Object, FString &OutPropertyName) const override
 
ENGINE_API FStreamableManager ()
 
ENGINE_API ~FStreamableManager ()
 
 FStreamableManager (const FStreamableManager &)=delete
 
FStreamableManageroperator= (const FStreamableManager &)=delete
 
- Public Member Functions inherited from FGCObject
 FGCObject ()
 
 FGCObject (const FGCObject &Other)
 
 FGCObject (FGCObject &&Other)
 
 FGCObject (EFlags Flags)
 
virtual ~FGCObject ()
 
FGCObjectoperator= (const FGCObject &)
 
FGCObjectoperator= (FGCObject &&)
 
COREUOBJECT_API void RegisterGCObject ()
 
COREUOBJECT_API void UnregisterGCObject ()
 

Static Public Attributes

static constexpr TAsyncLoadPriority DefaultAsyncLoadPriority = UE::StreamableManager::Private::DefaultAsyncLoadPriority
 
static constexpr TAsyncLoadPriority AsyncLoadHighPriority = UE::StreamableManager::Private::AsyncLoadHighPriority
 
static constexpr FStreamableDownloadPriority DownloadVeryLowPriority = UE::StreamableManager::Private::DownloadVeryLowPriority
 
static constexpr FStreamableDownloadPriority DownloadLowPriority = UE::StreamableManager::Private::DownloadLowPriority
 
static constexpr FStreamableDownloadPriority DownloadDefaultPriority = UE::StreamableManager::Private::DownloadDefaultPriority
 
static constexpr FStreamableDownloadPriority DownloadHighPriority = UE::StreamableManager::Private::DownloadHighPriority
 
static constexpr FStreamableDownloadPriority DownloadVeryHighPriority = UE::StreamableManager::Private::DownloadVeryHighPriority
 
- Static Public Attributes inherited from FGCObject
static COREUOBJECT_API UGCObjectReferencerGGCObjectReferencer = nullptr
 

Additional Inherited Members

- Public Types inherited from FGCObject
enum class  EFlags : uint32 { None = 0 , RegisterLater = 1 << 0 , AddStableNativeReferencesOnly = 1 << 1 }
 
- Static Public Member Functions inherited from FGCObject
static COREUOBJECT_API void StaticInit ()
 

Detailed Description

A native class for managing streaming assets in and keeping them in memory. AssetManager is the global singleton version of this with blueprint access

Constructor & Destructor Documentation

◆ FStreamableManager() [1/2]

FStreamableManager::FStreamableManager ( )

◆ ~FStreamableManager()

FStreamableManager::~FStreamableManager ( )

◆ FStreamableManager() [2/2]

FStreamableManager::FStreamableManager ( const FStreamableManager )
delete

Not safe to copy or duplicate

Member Function Documentation

◆ AddReferencedObjects()

void FStreamableManager::AddReferencedObjects ( FReferenceCollector Collector)
overridevirtual

Add referenced objects to stop them from GCing

Implements FGCObject.

◆ AreAllAsyncLoadsComplete()

bool FStreamableManager::AreAllAsyncLoadsComplete ( ) const

Returns true if all pending async loads have finished for all targets

◆ CreateCombinedHandle()

Creates a combined handle, which will wait for other handles to complete before completing. The child handles will be held as hard references as long as this handle is active.

Parameters
ChildHandlesList of handles to wrap into this one
DebugName[optional] Name of this handle, will be reported in debug tools
Options[optional] Additional flags that let you specify how the combined handle will be constructed
Params[optional] Load Parameters. TargetsToStream, Priority, bManageActiveHandle, bStartStalled and DownloadParams are ignored
Location[optional] Is not intended for direct use, the parameter catches call site source location. That location is used for debug tools output.

◆ CreateErrorHandle()

TSharedPtr< FStreamableHandle > FStreamableManager::CreateErrorHandle ( UE::UnifiedError::FError &&  Error,
FStreamableAsyncLoadParams &&  Params,
FString  DebugName = FStreamableHandle::HandleDebugName_CombinedHandle,
UE::FSourceLocation  Location = UE::FSourceLocation::Current() 
)

Creates a canceled handle with an error set. Does not do any loading. Does not manage the handle. Useful in situations where a handle needs to be returned with an error without starting an actual load occuring.

Parameters
ErrorThe error to set on the handle
ParamsLoad Parameters
DownloadParamsAdditional Parameters to control downloading
DebugName[optional] Name of this handle, will be reported in debug tools
Location[optional] Is not intended for direct use, the parameter catches call site source location. That location is used for debug tools output.

◆ GetActiveHandles()

bool FStreamableManager::GetActiveHandles ( const FSoftObjectPath Target,
TArray< TSharedRef< FStreamableHandle > > &  HandleList,
bool  bOnlyManagedHandles = false 
) const

Gets list of handles that are directly referencing this asset, returns true if any found. Combined Handles will not be returned by this function.

Parameters
TargetAsset to get active handles for
HandleListFill in list of active handles
bOnlyManagedHandlesIf true, only return handles that are managed by this manager, other active handles are skipped

◆ GetManagerName()

const FString & FStreamableManager::GetManagerName ( ) const

Returns the debug name for this manager

◆ GetReferencerName()

virtual FString FStreamableManager::GetReferencerName ( ) const
inlineoverridevirtual

Overload this method to report a name for your referencer

Implements FGCObject.

◆ GetReferencerPropertyName()

bool FStreamableManager::GetReferencerPropertyName ( UObject Object,
FString &  OutPropertyName 
) const
overridevirtual

Overload this method to report how the specified object is referenced, if necessary

Reimplemented from FGCObject.

◆ IsAsyncLoadComplete()

bool FStreamableManager::IsAsyncLoadComplete ( const FSoftObjectPath Target) const

Returns true if all pending async loads have finished for this target

◆ LoadSynchronous() [1/4]

UObject * FStreamableManager::LoadSynchronous ( const FSoftObjectPath Target,
bool  bManageActiveHandle = false,
TSharedPtr< FStreamableHandle > *  RequestHandlePointer = nullptr,
UE::FSourceLocation  Location = UE::FSourceLocation::Current() 
)

Synchronously load the referred asset and return the loaded object, or nullptr if it can't be found. This can be very slow and may stall the game thread for several seconds.

Parameters
TargetSpecific asset to load off disk
bManageActiveHandle[optional] If true, the manager will keep the streamable handle active until explicitly released
RequestHandlePointer[optional] If non-null, this will set the handle to the handle used to make this request. This useful for later releasing the handle
Location[optional] Is not intended for direct use, the parameter catches call site source location. That location is used for debug tools output.

◆ LoadSynchronous() [2/4]

template<typename T >
T * FStreamableManager::LoadSynchronous ( const FSoftObjectPath Target,
bool  bManageActiveHandle = false,
TSharedPtr< FStreamableHandle > *  RequestHandlePointer = nullptr,
UE::FSourceLocation  Location = UE::FSourceLocation::Current() 
)
inline

Typed wrappers

◆ LoadSynchronous() [3/4]

template<typename T >
TSubclassOf< T > FStreamableManager::LoadSynchronous ( const TSoftClassPtr< T > &  Target,
bool  bManageActiveHandle = false,
TSharedPtr< FStreamableHandle > *  RequestHandlePointer = nullptr,
UE::FSourceLocation  Location = UE::FSourceLocation::Current() 
)
inline

◆ LoadSynchronous() [4/4]

template<typename T >
T * FStreamableManager::LoadSynchronous ( const TSoftObjectPtr< T > &  Target,
bool  bManageActiveHandle = false,
TSharedPtr< FStreamableHandle > *  RequestHandlePointer = nullptr,
UE::FSourceLocation  Location = UE::FSourceLocation::Current() 
)
inline

◆ operator=()

FStreamableManager & FStreamableManager::operator= ( const FStreamableManager )
delete

◆ RequestAsyncLoad() [1/2]

TSharedPtr< FStreamableHandle > FStreamableManager::RequestAsyncLoad ( FStreamableAsyncLoadParams &&  Params,
FString  DebugName = FString(),
UE::FSourceLocation  Location = UE::FSourceLocation::Current() 
)

This is the primary streamable operation. Requests streaming of one or more target objects. When complete, a delegate function is called. Returns a Streamable Handle.

Parameters
ParamsLoad Parameters
DebugName[optional] Name of this handle, either FString or anything that can construct FString, will be reported in debug tools
Location[optional] Is not intended for direct use, the parameter catches call site source location. That location is used for debug tools output.

◆ RequestAsyncLoad() [2/2]

template<typename PathContainerType , typename FuncType , typename >
TSharedPtr< FStreamableHandle > FStreamableManager::RequestAsyncLoad ( PathContainerType &&  TargetsToStream,
FuncType &&  DelegateToCall = FStreamableDelegateWithHandle(),
TAsyncLoadPriority  Priority = DefaultAsyncLoadPriority,
bool  bManageActiveHandle = false,
bool  bStartStalled = false,
FString  DebugName = FString(),
UE::FSourceLocation  Location = UE::FSourceLocation::Current() 
)

This is the primary streamable operation. Requests streaming of one or more target objects. When complete, a delegate function is called. Returns a Streamable Handle.

Parameters
TargetsToStreamAssets to load off disk
DelegateToCall[optional] Delegate to call when load finishes. Will be called on the next tick if asset is already loaded, or many seconds later
Priority[optional] Priority to pass to the streaming system, higher priority will be loaded first
bManageActiveHandle[optional] If true, the manager will keep the streamable handle active until explicitly released
bStartStalled[optional] If true, the handle will start in a stalled state and will not attempt to actually async load until StartStalledHandle is called on it
DebugName[optional] Name of this handle, either FString or anything that can construct FString
Location[optional] Is not intended for direct use, the parameter catches call site source location. That location is used for debug tools output.

◆ RequestSyncLoad()

TSharedPtr< FStreamableHandle > FStreamableManager::RequestSyncLoad ( PathContainerType &&  TargetsToStream,
bool  bManageActiveHandle = false,
FString  DebugName = FString(),
UE::FSourceLocation  Location = UE::FSourceLocation::Current() 
)

Synchronously load a set of assets, and return a handle. This can be very slow and may stall the game thread for several seconds.

Parameters
TargetsToStreamAssets to load off disk
bManageActiveHandle[optional] If true, the manager will keep the streamable handle active until explicitly released
DebugName[optional] Name of this handle, either FString or anything that can construct FString
Location[optional] Is not intended for direct use, the parameter catches call site source location. That location is used for debug tools output.

◆ ResolveRedirects()

FSoftObjectPath FStreamableManager::ResolveRedirects ( const FSoftObjectPath Target) const

Checks for any redirectors that were previously loaded, and returns the redirected target if found. This will not handle redirects that it doesn't yet know about

◆ SetManagerName()

void FStreamableManager::SetManagerName ( FString  InName)

Modifies the debug name of this manager, used for debugging GC references

◆ Unload()

void FStreamableManager::Unload ( const FSoftObjectPath Target)

This will release any managed active handles pointing to the target soft object path, even if they include other requested assets in the same load

Member Data Documentation

◆ AsyncLoadHighPriority

constexpr TAsyncLoadPriority FStreamableManager::AsyncLoadHighPriority = UE::StreamableManager::Private::AsyncLoadHighPriority
inlinestaticconstexpr

◆ DefaultAsyncLoadPriority

constexpr TAsyncLoadPriority FStreamableManager::DefaultAsyncLoadPriority = UE::StreamableManager::Private::DefaultAsyncLoadPriority
inlinestaticconstexpr

◆ DownloadDefaultPriority

constexpr FStreamableDownloadPriority FStreamableManager::DownloadDefaultPriority = UE::StreamableManager::Private::DownloadDefaultPriority
inlinestaticconstexpr

◆ DownloadHighPriority

constexpr FStreamableDownloadPriority FStreamableManager::DownloadHighPriority = UE::StreamableManager::Private::DownloadHighPriority
inlinestaticconstexpr

◆ DownloadLowPriority

constexpr FStreamableDownloadPriority FStreamableManager::DownloadLowPriority = UE::StreamableManager::Private::DownloadLowPriority
inlinestaticconstexpr

◆ DownloadVeryHighPriority

constexpr FStreamableDownloadPriority FStreamableManager::DownloadVeryHighPriority = UE::StreamableManager::Private::DownloadVeryHighPriority
inlinestaticconstexpr

◆ DownloadVeryLowPriority

constexpr FStreamableDownloadPriority FStreamableManager::DownloadVeryLowPriority = UE::StreamableManager::Private::DownloadVeryLowPriority
inlinestaticconstexpr

The documentation for this struct was generated from the following files: