![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <RenderAssetUpdate.h>
Inheritance diagram for FRenderAssetUpdate:Classes | |
| class | FMipUpdateTask |
Public Types | |
| enum | EThreadType { TT_None , TT_Render , TT_Async , TT_GameThread , TT_GameRunningAsync } |
| enum | ETaskState { TS_Done , TS_Suspended , TS_InProgress , TS_Locked , TS_Init } |
Public Member Functions | |
| UE_API | FRenderAssetUpdate (const UStreamableRenderAsset *InAsset) |
| UE_API void | Tick (EThreadType InCurrentThread) |
| bool | IsCompleted () const |
| virtual void | Abort () |
| virtual bool | CanAbandon () const |
| virtual void | OnAbandoned () |
| bool | IsCancelled () const |
| bool | IsSuccessfullyFinished () const |
| UE_API ETaskState | DoLock () |
| UE_API void | DoUnlock (ETaskState PreviousTaskState) |
| bool | IsLocked () const |
| virtual EThreadType | GetRelevantThread () const =0 |
| FReturnedRefCountValue | AddRef () const final override |
| UE_API uint32 | Release () const final override |
| uint32 | GetRefCount () const final override |
Public Member Functions inherited from IRefCountedObject | |
| virtual | ~IRefCountedObject () |
Protected Types | |
| typedef FAutoDeleteAsyncTask< FMipUpdateTask > | FAsyncMipUpdateTask |
Protected Member Functions | |
| virtual UE_API | ~FRenderAssetUpdate () |
| virtual ETaskState | TickInternal (EThreadType InCurrentThread, bool bCheckForSuspension)=0 |
| void | MarkAsCancelled () |
| void | MarkAsSuccessfullyFinished () |
| UE_API void | ScheduleGTTask () |
| UE_API void | ScheduleRenderTask () |
| UE_API void | ScheduleAsyncTask () |
Protected Attributes | |
| const FStreamableRenderResourceState | ResourceState |
| const int32 | CurrentFirstLODIdx = INDEX_NONE |
| const int32 | PendingFirstLODIdx = INDEX_NONE |
| FCriticalSection | CS |
| int32 | ScheduledGTTasks |
| int32 | ScheduledRenderTasks |
| int32 | ScheduledAsyncTasks |
| const UStreamableRenderAsset * | StreamableAsset = nullptr |
| FThreadSafeCounter | TaskSynchronization |
| bool | bIsCancelled |
| bool | bDeferExecution |
| bool | bSuccess |
| volatile ETaskState | TaskState |
Friends | |
| class | FRenderAssetUpdateTickGTTask |
This class provides a framework for loading and unloading the texture/mesh LODs. Each thread essentially calls Tick() until the job is done. The object can be safely deleted when IsCompleted() returns true.
The async task to update this object, only one can be active at anytime. It just calls Tick().
| FRenderAssetUpdate::FRenderAssetUpdate | ( | const UStreamableRenderAsset * | InAsset | ) |
|
protectedvirtual |
Cancel the current update. Will also attempt to cancel pending IO requests, see FTexture2DStreamIn_IO::Abort(). This is called outside of the update loop when a cancelation is required for external events.
Reimplemented in FSkeletalMeshUpdate, FStaticMeshUpdate, UE::FTexture2DStreamIn_DerivedData, FTextureStreamIn, FSkeletalMeshStreamIn_IO, FStaticMeshStreamIn_IO, and FTexture2DStreamIn_IO.
|
inlinefinaloverridevirtual |
Implements IRefCountedObject.
Allows the update to be decoupled from its UStreamableRenderAsset so it can be independently garbage collected. This is called when we query IsReadyForFinishDestroy on the UStreamableRenderAsset. Returns true if the asset update can handle being abandoned.
Reimplemented in FTexture2DStreamIn_IO.
| FRenderAssetUpdate::ETaskState FRenderAssetUpdate::DoLock | ( | ) |
Perform a lock on the object, preventing any other thread from processing a pending task in Tick().
| void FRenderAssetUpdate::DoUnlock | ( | ETaskState | PreviousTaskState | ) |
Release any lock on the object, allowing other thread to modify it.
|
inlinefinaloverridevirtual |
Implements IRefCountedObject.
|
pure virtual |
Return the thread relevant to the next step of execution.
Implemented in TRenderAssetUpdate< TContext >, TRenderAssetUpdate< FSkelMeshUpdateContext >, TRenderAssetUpdate< FStaticMeshUpdateContext >, TRenderAssetUpdate< FTexture2DUpdateContext >, and TRenderAssetUpdate< FTextureUpdateContext >.
|
inline |
Returns whether the task was aborted through Abort() or cancelled.
|
inline |
Returns whether the task has finished executing and there is no other thread possibly accessing it.
|
inline |
|
inline |
Returns whether this update has finished successfully.
|
inlineprotected |
Set the task state as cancelled. This is internally called in Abort() and when any critical conditions are not met when performing the update.
|
inlineprotected |
Called when the asset update is being abandoned. Execute any task abandon specific cleanup here.
|
finaloverridevirtual |
Implements IRefCountedObject.
|
protected |
|
protected |
|
protected |
| void FRenderAssetUpdate::Tick | ( | EThreadType | InCurrentThread | ) |
Do or schedule any pending work for a given texture.
| InAsset | - the texture/mesh being updated, this must be the same texture/mesh as the texture/mesh used to create this object. |
| InCurrentThread | - the thread from which the tick is being called. Using TT_None ensures that no work will be immediately performed. |
|
protectedpure virtual |
|
friend |
|
protected |
Defer execution even if a task pushes a new task on the same thread.
|
protected |
Whether the task has been cancelled because the update could not proceed or because the user called Abort().
|
protected |
Whether this update finished successfully. True means that it is TS_Done and not cancelled mid way.
|
protected |
Critical Section.
|
protected |
|
protected |
|
protected |
The streamable state requested.
|
protected |
Number of Ticks scheduled on async tasks.
|
protected |
Number of Ticks scheduled on the game thread.
|
protected |
Number of Ticks scheduled on the render thread.
|
protected |
The asset updated
|
protected |
The state of the work yet to be performed to complete the update or cancelation.
|
protected |
Synchronization used for trigger the task next step execution.