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

#include <WorldCollision.h>

+ Inheritance diagram for AsyncTraceData:

Public Member Functions

ENGINE_API AsyncTraceData ()
 
ENGINE_API ~AsyncTraceData ()
 

Public Attributes

TArray< TUniquePtr< TTraceThreadData< FTraceDatum > > > TraceData
 
TArray< TUniquePtr< TTraceThreadData< FOverlapDatum > > > OverlapData
 
int32 NumQueuedTraceData
 
int32 NumQueuedOverlapData
 
FTransactionalAsyncTraceBuffer< FTraceDatumTransactionalTraceData
 
FTransactionalAsyncTraceBuffer< FOverlapDatumTransactionalOverlapData
 
bool bAsyncAllowed
 
bool bAsyncTasksCompleted
 
FGraphEventArray AsyncTraceCompletionEvent
 

Additional Inherited Members

- Protected Member Functions inherited from FNoncopyable
 FNoncopyable ()
 
 ~FNoncopyable ()
 

Detailed Description

Contains all Async Trace Result for one frame.

We use double buffer for trace data pool. FrameNumber % 2 = is going to be the one collecting NEW data Check FWorldAsyncTraceState to see how this is used. For now it is only double buffer, but it can be more.

Constructor & Destructor Documentation

◆ AsyncTraceData()

AsyncTraceData::AsyncTraceData ( )

◆ ~AsyncTraceData()

AsyncTraceData::~AsyncTraceData ( )
default

Member Data Documentation

◆ AsyncTraceCompletionEvent

FGraphEventArray AsyncTraceData::AsyncTraceCompletionEvent

Thread completion event for batch

◆ bAsyncAllowed

bool AsyncTraceData::bAsyncAllowed

if Execution is all done, set this to be true

when reinitialize bAsyncAllowed is true, once execution is done, this will set to be false this is to find cases where execution is already done but another request is made again within the same frame.

◆ bAsyncTasksCompleted

bool AsyncTraceData::bAsyncTasksCompleted

◆ NumQueuedOverlapData

int32 AsyncTraceData::NumQueuedOverlapData

Datum entries in OverlapData are persistent for efficiency. This is the number of them that are actually in use (rather than OverlapData.Num()).

◆ NumQueuedTraceData

int32 AsyncTraceData::NumQueuedTraceData

Datum entries in TraceData are persistent for efficiency. This is the number of them that are actually in use (rather than TraceData.Num()).

◆ OverlapData

TArray<TUniquePtr<TTraceThreadData<FOverlapDatum> > > AsyncTraceData::OverlapData

◆ TraceData

TArray<TUniquePtr<TTraceThreadData<FTraceDatum> > > AsyncTraceData::TraceData

Data Buffer for each trace type - one for Trace/Sweep and one for Overlap

FTraceThreadData is one atomic data size for thread so once that's filled up, this will be sent to thread if you need more, it will allocate new FTraceThreadData and add to TArray

however when we calculate index of buffer, we calculate continuously, meaning if TraceData(1).Buffer[50] will have 1*ASYNC_TRACE_BUFFER_SIZE + 50 as index in order to give UNIQUE INDEX to every data in this buffer

◆ TransactionalOverlapData

FTransactionalAsyncTraceBuffer<FOverlapDatum> AsyncTraceData::TransactionalOverlapData

◆ TransactionalTraceData

FTransactionalAsyncTraceBuffer<FTraceDatum> AsyncTraceData::TransactionalTraceData

Data for Transactional async queries. This is effectively the same as above, however it must be stored separately as we cannot run any async queries until a transaction is closed.


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