engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 友元 | 所有成员列表
FStreamableHandle结构体 参考

A handle to a synchronous or async load. 更多...

#include <StreamableManager.h>

+ 类 FStreamableHandle 继承关系图:

Public 成员函数

bool BindCancelDelegate (FStreamableDelegate NewDelegate)
 Bind delegate that is called if handle is canceled, only works if loading is in progress. 更多...
 
bool BindCompleteDelegate (FStreamableDelegate NewDelegate)
 Bind delegate that is called when load completes, only works if loading is in progress. 更多...
 
bool BindUpdateDelegate (FStreamableUpdateDelegate NewDelegate)
 Bind delegate that is called periodically as delegate updates, only works if loading is in progress. 更多...
 
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
 
 FStreamableHandle (const FStreamableHandle &)=delete
 Not safe to copy or duplicate
 
const FString & GetDebugName () const
 Returns the debug name for this handle.
 
UObject * GetLoadedAsset () const
 Returns first asset in requested asset list, if it's been successfully loaded. 更多...
 
void GetLoadedAssets (TArray< UObject * > &LoadedAssets) const
 Adds all loaded assets if load has succeeded. 更多...
 
void GetLoadedCount (int32 &LoadedCount, int32 &RequestedCount) const
 Returns number of assets that have completed loading out of initial list, failed loads will count as loaded
 
struct FStreamableManager * GetOwningManager () const
 Get the StreamableManager for this handle
 
TAsyncLoadPriority GetPriority () const
 Returns the streaming priority.
 
float GetProgress () const
 Returns progress as a value between 0.0 and 1.0.
 
void GetRequestedAssets (TArray< FSoftObjectPath > &AssetList) const
 Gets list of assets references this load was started with. 更多...
 
bool HasLoadCompleted () const
 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 HasLoadCompletedOrStalled () const
 Returns true if we've done all the loading we can now, ie all handles are either completed or stalled
 
bool IsActive () const
 If this handle is still active, meaning it wasn't canceled or released
 
bool IsCombinedHandle () const
 Returns true if this is a combined handle that depends on child handles.
 
bool IsLoadingInProgress () const
 True if load is still ongoing and we haven't been cancelled
 
bool IsStalled () const
 If this handle is stalled and waiting for another event to occur before it is actually requested
 
void ReleaseHandle ()
 Release this handle. 更多...
 
void StartStalledHandle ()
 Tells a stalled handle to start its actual request.
 
EAsyncPackageState::Type WaitUntilComplete (float Timeout=0.0f, bool bStartStalledHandles=true)
 Blocks until the requested assets have loaded. 更多...
 
bool WasCanceled () const
 If this request was cancelled. 更多...
 
 ~FStreamableHandle ()
 Destructor
 
- Public 成员函数 继承自 TSharedFromThis< FStreamableHandle, ESPMode::Fast >
TSharedRef< FStreamableHandle, Mode > AsShared ()
 Provides access to a shared reference to this object. 更多...
 
TSharedRef< FStreamableHandle const, Mode > AsShared () const
 Provides access to a shared reference to this object (const.) Note that is only valid to call this after a shared reference (or shared pointer) to the object has already been created. 更多...
 
FORCEINLINE bool DoesSharedInstanceExist () const
 Checks whether our referenced instance is valid (ie, whether it's safe to call AsShared). 更多...
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, Mode > const *InSharedPtr, OtherType *InObject) const
 INTERNAL USE ONLY – Do not call this method. 更多...
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, Mode > const *InSharedRef, OtherType *InObject) const
 INTERNAL USE ONLY – Do not call this method. 更多...
 

静态 Public 成员函数

static void ExecuteDelegate (const FStreamableDelegate &Delegate, TSharedPtr< FStreamableHandle > AssociatedHandle=nullptr, const FStreamableDelegate &CancelDelegate=FStreamableDelegate())
 Calls a StreamableDelegate, this will add to the delayed callback queue depending on s.StreamableDelegateDelayFrames 更多...
 

友元

struct FStreamableManager
 

额外继承的成员函数

- Protected 成员函数 继承自 TSharedFromThis< FStreamableHandle, ESPMode::Fast >
FORCEINLINE TSharedFromThis & operator= (TSharedFromThis const &)
 Hidden stub assignment operator
 
 TSharedFromThis ()
 Hidden stub constructor
 
 TSharedFromThis (TSharedFromThis const &)
 Hidden stub copy constructor
 
 ~TSharedFromThis ()
 Hidden destructor
 
- 静态 Protected 成员函数 继承自 TSharedFromThis< FStreamableHandle, ESPMode::Fast >
static FORCEINLINE TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 Provides access to a shared reference to an object, given the object's 'this' pointer. 更多...
 
static FORCEINLINE TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 Provides access to a shared reference to an object, given the object's 'this' pointer. 更多...
 

详细描述

A handle to a synchronous or async load.

As long as the handle is Active, loaded assets will stay in memory

成员函数说明

◆ BindCancelDelegate()

bool FStreamableHandle::BindCancelDelegate ( FStreamableDelegate  NewDelegate)

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

This will overwrite any already bound delegate!

◆ BindCompleteDelegate()

bool FStreamableHandle::BindCompleteDelegate ( FStreamableDelegate  NewDelegate)

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

This will overwrite any already bound delegate!

◆ BindUpdateDelegate()

bool FStreamableHandle::BindUpdateDelegate ( FStreamableUpdateDelegate  NewDelegate)

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

This will overwrite any already bound delegate!

◆ ExecuteDelegate()

static void FStreamableHandle::ExecuteDelegate ( const FStreamableDelegate &  Delegate,
TSharedPtr< FStreamableHandle >  AssociatedHandle = nullptr,
const FStreamableDelegate &  CancelDelegate = FStreamableDelegate() 
)
static

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

参数
DelegatePrimary delegate to execute
AssociatedHandleStreamable handle associated with this delegate, may be null
CancelDelegateIf handle gets cancelled before primary delegate executes, this delegate will be called instead

◆ GetLoadedAsset()

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

◆ GetLoadedAssets()

void FStreamableHandle::GetLoadedAssets ( TArray< UObject * > &  LoadedAssets) const

Adds all loaded assets if load has succeeded.

Some entries will be null if loading failed

◆ GetRequestedAssets()

void FStreamableHandle::GetRequestedAssets ( TArray< FSoftObjectPath > &  AssetList) 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

◆ ReleaseHandle()

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

◆ WaitUntilComplete()

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

参数
TimeoutMaximum time to wait, if this is 0 it will wait forever
StartStalledHandlesIf true it will force all handles waiting on external resources to try and load right now

◆ WasCanceled()

bool FStreamableHandle::WasCanceled ( ) const
inline

If this request was cancelled.

Assets may still have been loaded, but completion delegate was not called


该结构体的文档由以下文件生成: