UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FRenderAssetUpdate Class Referenceabstract

#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< FMipUpdateTaskFAsyncMipUpdateTask
 

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 UStreamableRenderAssetStreamableAsset = nullptr
 
FThreadSafeCounter TaskSynchronization
 
bool bIsCancelled
 
bool bDeferExecution
 
bool bSuccess
 
volatile ETaskState TaskState
 

Friends

class FRenderAssetUpdateTickGTTask
 

Detailed Description

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.

Member Typedef Documentation

◆ FAsyncMipUpdateTask

The async task to update this object, only one can be active at anytime. It just calls Tick().

Member Enumeration Documentation

◆ ETaskState

The state of scheduled work for the update process.

Enumerator
TS_Done 
TS_Suspended 
TS_InProgress 
TS_Locked 
TS_Init 

◆ EThreadType

A thread type used for doing a part of the update process.

Enumerator
TT_None 
TT_Render 
TT_Async 
TT_GameThread 
TT_GameRunningAsync 

Constructor & Destructor Documentation

◆ FRenderAssetUpdate()

FRenderAssetUpdate::FRenderAssetUpdate ( const UStreamableRenderAsset InAsset)

◆ ~FRenderAssetUpdate()

FRenderAssetUpdate::~FRenderAssetUpdate ( )
protectedvirtual

Member Function Documentation

◆ Abort()

virtual void FRenderAssetUpdate::Abort ( )
inlinevirtual

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.

◆ AddRef()

FReturnedRefCountValue FRenderAssetUpdate::AddRef ( ) const
inlinefinaloverridevirtual

Implements IRefCountedObject.

◆ CanAbandon()

virtual bool FRenderAssetUpdate::CanAbandon ( ) const
inlinevirtual

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.

◆ DoLock()

FRenderAssetUpdate::ETaskState FRenderAssetUpdate::DoLock ( )

Perform a lock on the object, preventing any other thread from processing a pending task in Tick().

◆ DoUnlock()

void FRenderAssetUpdate::DoUnlock ( ETaskState  PreviousTaskState)

Release any lock on the object, allowing other thread to modify it.

◆ GetRefCount()

uint32 FRenderAssetUpdate::GetRefCount ( ) const
inlinefinaloverridevirtual

Implements IRefCountedObject.

◆ GetRelevantThread()

virtual EThreadType FRenderAssetUpdate::GetRelevantThread ( ) const
pure virtual

◆ IsCancelled()

bool FRenderAssetUpdate::IsCancelled ( ) const
inline

Returns whether the task was aborted through Abort() or cancelled.

◆ IsCompleted()

bool FRenderAssetUpdate::IsCompleted ( ) const
inline

Returns whether the task has finished executing and there is no other thread possibly accessing it.

◆ IsLocked()

bool FRenderAssetUpdate::IsLocked ( ) const
inline

◆ IsSuccessfullyFinished()

bool FRenderAssetUpdate::IsSuccessfullyFinished ( ) const
inline

Returns whether this update has finished successfully.

◆ MarkAsCancelled()

void FRenderAssetUpdate::MarkAsCancelled ( )
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.

◆ MarkAsSuccessfullyFinished()

void FRenderAssetUpdate::MarkAsSuccessfullyFinished ( )
inlineprotected

◆ OnAbandoned()

virtual void FRenderAssetUpdate::OnAbandoned ( )
inlinevirtual

Called when the asset update is being abandoned. Execute any task abandon specific cleanup here.

◆ Release()

uint32 FRenderAssetUpdate::Release ( ) const
finaloverridevirtual

Implements IRefCountedObject.

◆ ScheduleAsyncTask()

void FRenderAssetUpdate::ScheduleAsyncTask ( )
protected

◆ ScheduleGTTask()

void FRenderAssetUpdate::ScheduleGTTask ( )
protected

◆ ScheduleRenderTask()

void FRenderAssetUpdate::ScheduleRenderTask ( )
protected

◆ Tick()

void FRenderAssetUpdate::Tick ( EThreadType  InCurrentThread)

Do or schedule any pending work for a given texture.

Parameters
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.

◆ TickInternal()

Friends And Related Symbol Documentation

◆ FRenderAssetUpdateTickGTTask

Member Data Documentation

◆ bDeferExecution

bool FRenderAssetUpdate::bDeferExecution
protected

Defer execution even if a task pushes a new task on the same thread.

◆ bIsCancelled

bool FRenderAssetUpdate::bIsCancelled
protected

Whether the task has been cancelled because the update could not proceed or because the user called Abort().

◆ bSuccess

bool FRenderAssetUpdate::bSuccess
protected

Whether this update finished successfully. True means that it is TS_Done and not cancelled mid way.

◆ CS

FCriticalSection FRenderAssetUpdate::CS
protected

Critical Section.

◆ CurrentFirstLODIdx

const int32 FRenderAssetUpdate::CurrentFirstLODIdx = INDEX_NONE
protected

◆ PendingFirstLODIdx

const int32 FRenderAssetUpdate::PendingFirstLODIdx = INDEX_NONE
protected

◆ ResourceState

const FStreamableRenderResourceState FRenderAssetUpdate::ResourceState
protected

The streamable state requested.

◆ ScheduledAsyncTasks

int32 FRenderAssetUpdate::ScheduledAsyncTasks
protected

Number of Ticks scheduled on async tasks.

◆ ScheduledGTTasks

int32 FRenderAssetUpdate::ScheduledGTTasks
protected

Number of Ticks scheduled on the game thread.

◆ ScheduledRenderTasks

int32 FRenderAssetUpdate::ScheduledRenderTasks
protected

Number of Ticks scheduled on the render thread.

◆ StreamableAsset

const UStreamableRenderAsset* FRenderAssetUpdate::StreamableAsset = nullptr
protected

The asset updated

◆ TaskState

volatile ETaskState FRenderAssetUpdate::TaskState
protected

The state of the work yet to be performed to complete the update or cancelation.

◆ TaskSynchronization

FThreadSafeCounter FRenderAssetUpdate::TaskSynchronization
protected

Synchronization used for trigger the task next step execution.


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