Navigation
API > API/Plugins > API/Plugins/Niagara
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UNiagaraSimCache
References
| Module | Niagara |
| Header | /Engine/Plugins/FX/Niagara/Source/Niagara/Classes/NiagaraSimCache.h |
| Include | #include "NiagaraSimCache.h" |
Syntax
UCLASS (BlueprintType, MinimalAPI)
class UNiagaraSimCache : public UObject
Remarks
Recording of multiple frames of simulation data from a running Niagara system. Can be used to play back the captured recording or to inspect the captured data for debug purposes. Depending on the capture settings, not all attributes from the simulation are present in the cache.
To capture a cache, either (1) use the baker tool in the system editor, (2) use the Niagara component cache track in sequencer or (3) manually capture a running system with the "CaptureNiagaraSimCache" Blueprint functions
Constructors
| Type | Name | Description | |
|---|---|---|---|
UNiagaraSimCache
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | BeginAppend
(
FNiagaraSimCacheCreateParameters InCreateParameters, |
||
| bool | BeginAppend
(
FNiagaraSimCacheCreateParameters InCreateParameters, |
||
| bool | BeginWrite
(
FNiagaraSimCacheCreateParameters InCreateParameters, |
||
| bool | BeginWrite
(
FNiagaraSimCacheCreateParameters InCreateParameters, |
||
| bool | CanRead
(
UNiagaraSystem* NiagaraSystem |
||
| bool | EndWrite
(
bool bAllowAnalytics |
||
| void | ForEachEmitterAttribute
(
int32 EmitterIndex, |
Runs a function for each attribute for the provided emitter index. | |
| ENiagaraSimCacheAttributeCaptureMode | How were the attributes captured for this sim cache. | ||
| const FGuid & | GetCacheGuid () |
Get the caches assigned GUID, this can be set from a user or will be auto created on first write of the cache. | |
| const UObject * | GetDataInterfaceStorageObject
(
const FNiagaraVariableBase& DataInterface |
Returns the actual data we have captured in the SimCache for the given data interface. | |
| const UNiagaraSimCacheDebugData * | GetDebugData () |
Returns the debug data stored inside the cache, intended for internal use only. | |
| float | Get the duration the cache was recorded over. | ||
| int | GetEmitterIndex
(
FName EmitterName |
Get the emitter index from a name | |
| FName | GetEmitterName
(
int32 EmitterIndex |
Get the emitter name at the provided index. | |
| TArray< FName > | Returns a list of emitters we have captured in the SimCache. | ||
| int | GetEmitterNumInstances
(
int32 EmitterIndex, |
Get number of active instances for the emitter at the given frame. | |
| int | Get number of emitters stored inside the cache. | ||
| int | GetNumFrames () |
Get number of frames stored in the cache. | |
| float | Get the time the simulation was at when recorded. | ||
| TArray< FNiagaraVariableBase > | Returns a list of data interfaces we have captured in the SimCache. | ||
| UNiagaraSystem * | GetSystem
(
bool bLoadSynchronous |
Get the system this cache is based on | |
| TSoftObjectPtr< UNiagaraSystem > | Get the system asset this cache was created from. | ||
| bool | IsCacheValid () |
A valid cache is one that contains at least 1 frames worth of data. | |
| bool | IsEmpty () |
An empty cache contains no frame data and can not be used | |
| bool | Read
(
float TimeSeconds, |
||
| void | Reads Niagara attributes by name from the cache frame and appends them into the relevant arrays. | ||
| void | ReadColorAttribute
(
TArray< FLinearColor >& OutValues, |
Reads Niagara Color attributes by name from the cache frame and appends them into the OutValues array. | |
| UObject * | ReadDataInterfaceAs
(
UClass* RequestedType, |
Reads data interface data from the cache as the requested type. | |
| T * | ReadDataInterfaceAs
(
FName AttributeName, |
||
| void | ReadFloatAttribute
(
TArray< float >& OutValues, |
Reads Niagara float attributes by name from the cache frame and appends them into the OutValues array. | |
| bool | ReadFrame
(
int32 FrameIndex, |
||
| void | ReadIDAttribute
(
TArray< FNiagaraID >& OutValues, |
Reads Niagara ID attributes by name from the cache frame and appends them into the OutValues array. | |
| void | ReadIntAttribute
(
TArray< int32 >& OutValues, |
Reads Niagara int attributes by name from the cache frame and appends them into the OutValues array. | |
| void | ReadPositionAttribute
(
TArray< FVector >& OutValues, |
Reads Niagara Position attributes by name from the cache frame and appends them into the OutValues array. | |
| void | ReadPositionAttributeWithRebase
(
TArray< FVector >& OutValues, |
Reads Niagara Position attributes by name from the cache frame and appends them into the OutValues array. | |
| void | ReadQuatAttribute
(
TArray< FQuat >& OutValues, |
Reads Niagara Quaternion attributes by name from the cache frame and appends them into the OutValues array. | |
| void | Reads Niagara Quaternion attributes by name from the cache frame and appends them into the OutValues array. | ||
| void | ReadVector2Attribute
(
TArray< FVector2D >& OutValues, |
Reads Niagara Vec2 attributes by name from the cache frame and appends them into the OutValues array. | |
| void | ReadVector4Attribute
(
TArray< FVector4 >& OutValues, |
Reads Niagara Vec4 attributes by name from the cache frame and appends them into the OutValues array. | |
| void | ReadVectorAttribute
(
TArray< FVector >& OutValues, |
Reads Niagara Vec3 attributes by name from the cache frame and appends them into the OutValues array. | |
| void | SetCacheGuid
(
const FGuid& InGuid |
Set the caches GUID to use. | |
| bool | WriteFrame
(
UNiagaraComponent* NiagaraComponent |
||
| bool | WriteFrame
(
UNiagaraComponent* NiagaraComponent, |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| bool | Called to check if the object is ready for FinishDestroy. | ||
| void | Handles reading, writing, and reference collecting using FArchive. |
Typedefs
| Name | Description |
|---|---|
| FOnCacheBeginWrite | |
| FOnCacheEndWrite |
Constants
| Name | Description |
|---|---|
| CacheAgeResolution | Used to reduce rounding issues with age. |
| OnCacheBeginWrite | |
| OnCacheEndWrite |