UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Interchange::FInterchangeTaskBase Class Referenceabstract

#include <InterchangeTaskSystem.h>

+ Inheritance diagram for UE::Interchange::FInterchangeTaskBase:

Public Member Functions

 FInterchangeTaskBase ()
 
virtual ~FInterchangeTaskBase ()
 
uint64 GetTaskId () const
 
virtual EInterchangeTaskThread GetTaskThread () const
 
const TArray< uint64 > & GetPrerequisiteTasks () const
 
EInterchangeTaskStatus GetTaskStatus () const
 
virtual void Execute ()=0
 
INTERCHANGECORE_API void Wait () const
 

Protected Member Functions

INTERCHANGECORE_API bool SetTaskStatus (EInterchangeTaskStatus NewTaskStatus)
 
INTERCHANGECORE_API void SetPrerequisites (const TArray< uint64 > &InPrerequisiteTasks)
 

Constructor & Destructor Documentation

◆ FInterchangeTaskBase()

UE::Interchange::FInterchangeTaskBase::FInterchangeTaskBase ( )
inline

◆ ~FInterchangeTaskBase()

virtual UE::Interchange::FInterchangeTaskBase::~FInterchangeTaskBase ( )
inlinevirtual

Member Function Documentation

◆ Execute()

virtual void UE::Interchange::FInterchangeTaskBase::Execute ( )
pure virtual

This function must return the task id to fill the promise of the execution.

If the caller want to re-enqueue the task and not run the subsequent tasks after this function, It must set the task status to Waiting and the task will be re-execute later on another tick. This is the best way to implement a async wait.

Implemented in UE::Interchange::FInterchangeTaskLambda, UE::Interchange::FTaskTranslator, UE::Interchange::FTaskPreCompletion_GameThread, UE::Interchange::FTaskCompletion_GameThread, UE::Interchange::FTaskCreateSceneObjects_GameThread, UE::Interchange::FTaskImportObject_GameThread, UE::Interchange::FTaskImportObject_Async, UE::Interchange::FTaskImportObjectFinalize_GameThread, UE::Interchange::FTaskParsing, UE::Interchange::FTaskPipeline, UE::Interchange::FTaskWaitAssetCompilation_GameThread, and UE::Interchange::FTaskPostImport_GameThread.

◆ GetPrerequisiteTasks()

const TArray< uint64 > & UE::Interchange::FInterchangeTaskBase::GetPrerequisiteTasks ( ) const
inline

◆ GetTaskId()

uint64 UE::Interchange::FInterchangeTaskBase::GetTaskId ( ) const
inline

◆ GetTaskStatus()

EInterchangeTaskStatus UE::Interchange::FInterchangeTaskBase::GetTaskStatus ( ) const
inline

◆ GetTaskThread()

◆ SetPrerequisites()

void UE::Interchange::FInterchangeTaskBase::SetPrerequisites ( const TArray< uint64 > &  InPrerequisiteTasks)
protected

◆ SetTaskStatus()

bool UE::Interchange::FInterchangeTaskBase::SetTaskStatus ( EInterchangeTaskStatus  NewTaskStatus)
protected

◆ Wait()

void UE::Interchange::FInterchangeTaskBase::Wait ( ) const

Wait can be call only on game thread. Async thread wait can create dead lock by using all the thread resources.

The caller have some restriction to follow

  • This must be a safe place for any game thread task that will be executing during the wait.
  • Wait should not happen from a package/asset load call stack
  • Wait should not happen from a save package/asset call stack
  • Wait should not happen from a garbage collect call stack

If your system need to wait and you already have some locks or you are under a unsafe place you need to redesign your system to move the wait before you get to a unsafe call stack place to wait.


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