Navigation
API > API/Plugins > API/Plugins/Niagara > API/Plugins/Niagara/UNiagaraDataChannelLibrary
Description
LEGACY FUNCTION: Please use non-legacy version. Returns the number of readable elements in the given data channel This function is now legacy and and will soon be deprecated. Please use the new non-legacy function.
| Name | GetDataChannelElementCount |
| Type | function |
| Header File | /Engine/Plugins/FX/Niagara/Source/Niagara/Public/NiagaraDataChannelFunctionLibrary.h |
| Include Path | #include "NiagaraDataChannelFunctionLibrary.h" |
| Source | /Engine/Plugins/FX/Niagara/Source/Niagara/Private/NiagaraDataChannelFunctionLibrary.cpp |
UFUNCTION (BlueprintCallable, Category=NiagaraDataChannel,
Meta=(bReadPreviousFrame="true", DisplayName="Get Data Channel Element Count (Legacy)", AdvancedDisplay="SearchParams, bReadPreviousFrame", Keywords="niagara DataChannel num size", WorldContext="WorldContextObject", UnsafeDuringActorConstruction="true"))
static int32 GetDataChannelElementCount
(
const UObject * WorldContextObject,
const UNiagaraDataChannelAsset * Channel,
FNiagaraDataChannelSearchParameters SearchParams,
bool bReadPreviousFrame
)
Parameters
| Name | Remarks |
|---|---|
| WorldContextObject | World to execute in |
| Channel | The channel to read from |
| SearchParams | Parameters used when retrieving a specific set of Data Channel Data to read or write like the islands data channel type. |
| bReadPreviousFrame | True if this reader will read the previous frame's data. If false, we read the current frame. Reading the current frame allows for zero latency reads, but any data elements that are generated after this reader is used are missed. Reading the previous frame's data introduces a frame of latency but ensures we never miss any data as we have access to the whole frame. |