Navigation
API > API/Plugins > API/Plugins/Niagara
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UFXSystemAsset
- UNiagaraSystem
References
| Module | Niagara |
| Header | /Engine/Plugins/FX/Niagara/Source/Niagara/Classes/NiagaraSystem.h |
| Include | #include "NiagaraSystem.h" |
Syntax
UCLASS&40;BlueprintType, Meta&61;&40;LoadBehavior&61;"LazyOnDemand"&41;, MinimalAPI&41;
class UNiagaraSystem :
public UFXSystemAsset,
public INiagaraParameterDefinitionsSubscriber
Remarks
A Niagara System contains multiple Niagara Emitters to create various effects. Niagara Systems can be placed in the world, unlike Emitters, and expose User Parameters to configure an effect at runtime.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< TUniquePtr< FNiagaraActiveCompilation > > | ActiveCompilations | ||
| int32 | ActiveInstances | Total active instances of this system. | |
| FGuid | AssetGuid | ||
| TObjectPtr< UNiagaraBakerSettings > | BakerGeneratedSettings | Generated data baker settings, will be null until we have generated at least once. | |
| TObjectPtr< UNiagaraBakerSettings > | BakerSettings | Settings used inside the baker | |
| uint32: 1 | bAllDIsPostSimulateCanOverlapFrames | ||
| uint32: 1 | bAllDIsPostStageCanOverlapTickGroups | ||
| bool | bAllowCullingForLocalPlayers | ||
| uint32: 1 | bAllowCullingForLocalPlayersOverride | The override value for bAllowCullingForLocalPlayers from the Effect Type. | |
| bool | bAutoDeactivate | ||
| uint32: 1 | bBakeOutRapidIteration | When enable constant values are baked into the scripts while editing the system, this will increase iteration times but improve performance. | |
| uint32: 1 | bBakeOutRapidIterationOnCook | When enabled constant values are baked into scripts to improve performance. | |
| uint8: 1 | bCastShadow | When enabled this is the default value set on the component. | |
| bool | bCompilationReentrantGuard | ||
| uint32: 1 | bCompileForEdit | When enabled we compile for the edit path, which can result in slower system performance but faster editor responsiveness. | |
| uint32: 1 | bCompressAttributes | Toggles whether or not emitters within this system will try and compress their particle attributes. | |
| bool | bDeterminism | When disabled we will generate a RandomSeed per instance on reset which is not deterministic. | |
| uint32: 1 | bDisableDebugSwitches | When enable debug switches are disabled while editing the system. | |
| uint32: 1 | bDisableDebugSwitchesOnCook | When enabled debug switches are disabled when compiling the system. | |
| uint8: 1 | bDisableExperimentalVM | If true, disables experimental VM, if available | |
| bool | bDumpDebugEmitterInfo | ||
| bool | bDumpDebugSystemInfo | ||
| uint32: 1 | bFixedBounds | Whether or not fixed bounds are enabled. | |
| bool | bFixedTickDelta | ||
| bool | bFullyLoaded | ||
| uint32: 1 | bHasAnyGPUEmitters | ||
| uint32: 1 | bHasDIsWithPostSimulateTick | ||
| uint32: 1 | bIgnoreParticleReadsForAttributeTrim | If true ParticleReads will not absolutely prevent attribute trimming - User must ensure that the appropriate attributes are preserved on the source emitter! | |
| bool | bIsolateEnabled | ||
| uint32: 1 | bIsReadyToRunCached | ||
| uint32: 1 | bIsValidCached | ||
| uint32: 1 | bLwcEnabledSettingCached | ||
| uint32: 1 | bNeedsAsyncOptimize | ||
| bool | bNeedsGPUContextInitForDataInterfaces | ||
| uint32: 1 | bNeedsRequestCompile | When set the system needs to compile before it can be activated. | |
| uint32: 1 | bNeedsSortedSignificanceCull | ||
| uint32: 1 | bOverrideAllowCullingForLocalPlayers | Controls whether we should override the Effect Type value for bAllowCullingForLocalPlayers. | |
| uint8: 1 | bOverrideCastShadow | Various optional overrides for component properties when spawning a system. | |
| uint8: 1 | bOverrideCustomDepthStencilValue | ||
| uint8: 1 | bOverrideCustomDepthStencilWriteMask | ||
| uint8: 1 | bOverrideReceivesDecals | ||
| uint8: 1 | bOverrideRenderCustomDepth | ||
| bool | bOverrideScalabilitySettings | ||
| uint8: 1 | bOverrideTranslucencySortDistanceOffset | ||
| uint8: 1 | bOverrideTranslucencySortPriority | ||
| uint8: 1 | bReceivesDecals | When enabled this is the default value set on the component. Whether the primitive receives decals. | |
| uint8: 1 | bRenderCustomDepth | When enabled this is the default value set on the component. | |
| bool | bRequireCurrentFrameData | When enabled, we follow the settings on the UNiagaraComponent for tick order. | |
| uint8: 1 | bSupportLargeWorldCoordinates | If true then position type values will be rebased on system activation to fit into a float precision vector. | |
| uint32: 1 | bTrimAttributes | When enabled we trim particle attributes while editing the system. | |
| uint32: 1 | bTrimAttributesOnCook | If true Particle attributes will be removed from the DataSet if they are unnecessary (are never read by ParameterMap) | |
| TSharedPtr< FNiagaraGraphCachedDataBase, ESPMode::ThreadSafe > | CachedTraversalData | ||
| FText | Category | Category of this system. | |
| FString | CrashReporterTag | ||
| FNiagaraSystemScalabilitySettings & | CurrentScalabilitySettings | Scalability settings. | |
| int32 | CustomDepthStencilValue | When enabled this is the default value set on the component. | |
| ERendererStencilMask | CustomDepthStencilWriteMask | When enabled this is the default value set on the component. Mask used for stencil buffer writes. | |
| TObjectPtr< UNiagaraEditorDataBase > | EditorData | Data used by the editor to maintain UI state etc.. | |
| FNiagaraParameterStore | EditorOnlyAddedParameters | ||
| TObjectPtr< UNiagaraEditorParametersAdapterBase > | EditorParameters | Wrapper for editor only parameters. | |
| TObjectPtr< UNiagaraEffectType > | EffectType | An effect types defines settings shared between systems, for example scalability and validation rules. | |
| TArray< TSharedRef< const FNiagaraEmitterCompiledData > > | EmitterCompiledData | ||
| TArray< FNiagaraEmitterExecutionIndex > | EmitterExecutionOrder | Array of emitter indices sorted by execution priority. | |
| TArray< FNiagaraDataSetAccessor< ENiagaraExecutionState > > | EmitterExecutionStateAccessors | ||
| TArray< FNiagaraEmitterHandle > | EmitterHandles | Handles to the emitter this System will simulate. | |
| TArray< TArray< FNiagaraDataSetAccessor< FNiagaraSpawnInfo > > > | EmitterSpawnInfoAccessors | ||
| FNiagaraUserRedirectionParameterStore | ExposedParameters | Variables exposed to the outside work for tweaking | |
| FBox | FixedBounds | The fixed bounding box value for the whole system. | |
| float | FixedTickDeltaTime | If activated, the system ticks with a fixed delta time instead of the varying game thread delta time. | |
| ENiagaraScriptLibraryVisibility | LibraryVisibility | If this system is exposed to the library, or should be explicitly hidden. | |
| TOptional< float > | MaxDeltaTime | ||
| FNiagaraMessageStore | MessageStore | ||
| FOnScalabilityChanged | OnScalabilityChangedDelegate | A multicast delegate that is called whenever the effect type or the effect type values are changed | |
| FOnSystemCompiled | OnSystemCompiledDelegate | A multicast delegate which is called whenever the script has been compiled (successfully or not). | |
| FOnSystemPostEditChange | OnSystemPostEditChangeDelegate | A multicast delegate which is called whenever this system's properties are changed. | |
| TArray< TObjectPtr< UNiagaraParameterCollectionInstance > > | ParameterCollectionOverrides | ||
| TArray< FParameterDefinitionsSubscription > | ParameterDefinitionsSubscriptions | Subscriptions to definitions of parameters. | |
| FGraphEventRef | PSOPrecacheCompletionEvent | ||
| int32 | RandomSeed | Seed used for system script random number generator. | |
| TArray< FNiagaraRendererExecutionIndex > | RendererCompletionOrder | Array of renderer indices to notify system Completion, in order of execution | |
| TArray< int32 > | RendererDrawOrder | Precomputed emitter renderer draw order, since emitters & renderers are not dynamic we can do this. | |
| TArray< FNiagaraRendererExecutionIndex > | RendererPostTickOrder | Array of renderer indices to notify system PostTick, in order of execution | |
| TArray< TObjectPtr< UNiagaraScript > > | ScratchPadScripts | ||
| FGraphEventRef | ScriptOptimizationCompletionEvent | ||
| TUniquePtr< FNiagaraSystemStaticBuffers, FStaticBuffersDeletor > | StaticBuffers | ||
| FNiagaraSystemCompiledData | SystemCompiledData | ||
| FNiagaraDataSetAccessor< ENiagaraExecutionState > | SystemExecutionStateAccessor | ||
| FNiagaraSystemScalabilityOverrides | SystemScalabilityOverrides | ||
| TObjectPtr< UNiagaraScript > | SystemSpawnScript | The script which defines the System parameters, and which generates the bindings from System parameter to emitter parameter. | |
| TObjectPtr< UNiagaraScript > | SystemUpdateScript | The script which defines the System parameters, and which generates the bindings from System parameter to emitter parameter. | |
| FText | TemplateAssetDescription | ||
| ENiagaraScriptTemplateSpecification | TemplateSpecification | If this system is a regular system, a template or a behavior example. | |
| TObjectPtr< class UTexture2D > | ThumbnailImage | Internal: The thumbnail image. | |
| float | TranslucencySortDistanceOffset | When enabled this is the default value set on the component. | |
| int32 | TranslucencySortPriority | When enabled this is the default value set on the component. | |
| FNiagaraSystemUpdateContext | UpdateContext | ||
| FRenderCommandFence | WaitRenderCommandsFence | ||
| int32 | WarmupTickCount | Number of ticks to process for warmup. You can set by this or by time via WarmupTime. | |
| float | WarmupTickDelta | Delta time to use for warmup ticks. | |
| float | WarmupTime | Warm up time in seconds. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UNiagaraSystem
(
const FObjectInitializer& ObjectInitializer |
|||
UNiagaraSystem
(
FVTableHelper& Helper |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| FNiagaraEmitterHandle | AddEmitterHandle
(
UNiagaraEmitter& SourceEmitter, |
Adds a new emitter handle to this System. | |
| void | AddEmitterHandleDirect
(
FNiagaraEmitterHandle& EmitterHandleToAdd |
Adds a new emitter handle to this system without copying the original asset. | |
| void | AddToInstanceCountStat
(
int32 NumInstances, |
||
| bool | |||
| bool | |||
| bool | |||
| void | |||
| bool | |||
| void | Cache data & accessors from the compiled data, allows us to avoid per instance. | ||
| bool | CanObtainEmitterAttribute
(
const FNiagaraVariableBase& InVarWithUniqueNameNamespace, |
||
| bool | CanObtainSystemAttribute
(
const FNiagaraVariableBase& InVar, |
||
| bool | CanObtainUserVariable
(
const FNiagaraVariableBase& InVar |
||
| bool | ChangeEmitterVersion
(
const FVersionedNiagaraEmitter& Emitter, |
||
| bool | ComputeEmitterPriority
(
int32 EmitterIdx, |
Computes emitter priorities based on the dependency information. | |
| void | Computes the order in which the emitters in the Emitters array will be ticked and stores the results in EmitterExecutionOrder. | ||
| void | Computes the order in which renderers will render | ||
| void | DeclareConstructClasses
(
TArray< FTopLevelAssetPath >& OutConstructClasses, |
||
| FNiagaraEmitterHandle | DuplicateEmitterHandle
(
const FNiagaraEmitterHandle& EmitterHandleToDuplicate, |
Duplicates an existing emitter handle and adds it to the System. | |
| void | |||
| void | FindDataInterfaceDependencies
(
FVersionedNiagaraEmitterData* EmitterData, |
Queries all the data interfaces in the array for emitter dependencies. | |
| void | FindEventDependencies
(
FVersionedNiagaraEmitterData* EmitterData, |
Looks at all the event handlers in the emitter to determine which other emitters it depends on. | |
| void | |||
| void | ForEachPlatformSet
(
TAction Func |
Performs the passed action for all FNiagaraPlatformSets used by this system. | |
| void | ForEachScript
(
TAction Func |
Performs the passed action for all scripts in this system. | |
| void | GatherStaticVariables
(
TArray< FNiagaraVariable >& OutVars, |
||
| void | |||
| int32 & | |||
| const FGuid & | GetAssetGuid () |
||
| const UNiagaraBakerSettings * | |||
| UNiagaraBakerSettings * | |||
| const TSharedPtr< FNiagaraGraphCachedDataBase, ESPMode::ThreadSafe > & | Get the cached parameter map traversal for this emitter. | ||
| const FString & | |||
| ENiagaraCullProxyMode | |||
| const FNiagaraSystemScalabilityOverride & | |||
| const UNiagaraEditorDataBase * | Gets editor specific data stored with this system. | ||
| UNiagaraEditorDataBase * | Gets editor specific data stored with this system. | ||
| UNiagaraEditorParametersAdapterBase * | Gets editor specific parameters stored with this system | ||
| UNiagaraEffectType * | |||
| const TArray< TSharedRef< const FNiagaraEmitterCompiledData > > & | |||
| TConstArrayView< FNiagaraEmitterExecutionIndex > | |||
| TConstArrayView< FNiagaraDataSetAccessor< ENiagaraExecutionState > > | |||
| FNiagaraEmitterHandle & | GetEmitterHandle
(
int Idx |
||
| const FNiagaraEmitterHandle & | GetEmitterHandle
(
int Idx |
||
| TArray< FNiagaraEmitterHandle > & | Gets an array of the emitter handles. | ||
| const TArray< FNiagaraEmitterHandle > & | Gets an array of the emitter handles. | ||
| TConstArrayView< FNiagaraDataSetAccessor< FNiagaraSpawnInfo > > | GetEmitterSpawnInfoAccessors
(
int32 EmitterIndex |
||
| const FNiagaraUserRedirectionParameterStore & | From the last compile, what are the variables that were exported out of the system for external use? | ||
| FNiagaraUserRedirectionParameterStore & | |||
| FBox | |||
| float | |||
| bool | |||
| TOptional< float > | |||
| FNiagaraMessageStore & | |||
| int | |||
| bool | |||
| UNiagaraParameterCollectionInstance * | GetParameterCollectionOverride
(
UNiagaraParameterCollection* Collection |
||
| int32 | |||
| TConstArrayView< FNiagaraRendererExecutionIndex > | |||
| TConstArrayView< int32 > | |||
| TConstArrayView< FNiagaraRendererExecutionIndex > | |||
| FNiagaraSystemScalabilityOverrides & | |||
| const FNiagaraSystemScalabilitySettings & | |||
| FGraphEventRef | |||
| const FNiagaraSystemStaticBuffers * | |||
| TStatId | GetStatID
(
bool bGameThread, |
||
| const FNiagaraSystemCompiledData & | |||
| const FNiagaraDataSetAccessor< ENiagaraExecutionState > & | |||
| FNiagaraSystemScalabilityOverrides & | |||
| const UNiagaraScript * | |||
| UNiagaraScript * | Gets the System script which is used to populate the System parameters and parameter bindings. | ||
| const UNiagaraScript * | |||
| UNiagaraScript * | |||
| int32 | |||
| float | |||
| float | |||
| void | |||
| void | HandleVariableRemoved
(
const FNiagaraVariable& InOldVariable, |
Helper method to handle when an internal variable has been removed. | |
| void | HandleVariableRenamed
(
const FNiagaraVariable& InOldVariable, |
Helper method to handle when an internal variable has been renamed. | |
| bool | |||
| bool | |||
| bool | |||
| bool | HasOutstandingCompilationRequests
(
bool bIncludingGPUShaders |
Are there any pending compile requests? | |
| bool | |||
| void | Invalidates any active compilation requests which will ignore their results. | ||
| void | |||
| bool | IsLooping () |
||
| bool | IsReadyToRun () |
||
| bool | IsValid () |
Returns true if this system is valid and can be instanced. False otherwise. | |
| void | Tries to abort all running shader compilations | ||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | NeedsWarmup () |
||
| void | Updates any post compile data based upon data interfaces. | ||
| void | Updates the system post UObject change. | ||
| FOnScalabilityChanged & | Delegate called on effect type or effect type value change | ||
| FOnSystemCompiled & | Delegate called when the system's dependencies have all been compiled. | ||
| FOnSystemPostEditChange & | Delegate called on PostEditChange. | ||
| bool | PollForCompilationComplete
(
bool bFlushRequestCompile |
If we have a pending compile request, is it done with yet? | |
| void | PrecachePSOs () |
||
| void | Updates the rapid iteration parameters for all scripts referenced by the system. | ||
| void | RecomputeExecutionOrderForDataInterface
(
UNiagaraDataInterface* DataInterface |
||
| void | RecomputeExecutionOrderForEmitter
(
const FVersionedNiagaraEmitter& InEmitter |
||
| bool | ReferencesInstanceEmitter
(
const FVersionedNiagaraEmitter& Emitter |
Determines if this system has the supplied emitter as an editable and simulating emitter instance. | |
| void | RefreshSystemParametersFromEmitter
(
const FNiagaraEmitterHandle& EmitterHandle |
Updates the system's rapid iteration parameters from a specific emitter. | |
| void | |||
| void | RemoveEmitterHandle
(
const FNiagaraEmitterHandle& EmitterHandleToDelete |
Removes the provided emitter handle. | |
| void | RemoveEmitterHandlesById
(
const TSet< FGuid >& HandlesToRemove |
Removes the emitter handles which have an Id in the supplied set. | |
| void | RemoveSystemParametersForEmitter
(
const FNiagaraEmitterHandle& EmitterHandle |
Removes the system's rapid iteration parameters for a specific emitter. | |
| bool | RequestCompile
(
bool bForce, |
Request that any dirty scripts referenced by this system be compiled. | |
| void | RequestCompileForEmitter
(
const FVersionedNiagaraEmitter& InEmitter |
||
| void | Resets internal data leaving it in a state which would have minimal cost to exist in headless builds (servers) | ||
| void | |||
| void | SetBakeOutRapidIterationOnCook
(
bool bBakeOut |
||
| void | SetBakerGeneratedSettings
(
UNiagaraBakerSettings* Settings |
||
| void | SetEffectType
(
UNiagaraEffectType* EffectType |
||
| void | SetFixedBounds
(
const FBox& Box |
||
| void | SetIsolateEnabled
(
bool bIsolate |
||
| void | SetOverrideScalabilitySettings
(
bool bOverride |
||
| void | SetTrimAttributesOnCook
(
bool bTrim |
||
| void | SetWarmupTickDelta
(
float InWarmupTickDelta |
||
| void | SetWarmupTime
(
float InWarmupTime |
||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| void | |||
| void | |||
| void | |||
| bool | UsesCollection
(
const UNiagaraParameterCollection* Collection |
||
| bool | UsesEmitter
(
const FVersionedNiagaraEmitter& VersionedEmitter |
||
| bool | UsesEmitter
(
UNiagaraEmitter* Emitter |
||
| bool | UsesScript
(
const UNiagaraScript* Script |
||
| void | WaitForCompilationComplete
(
bool bIncludingGPUShaders, |
Blocks until all active compile jobs have finished |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginCacheForCookedPlatformData
(
const ITargetPlatform* TargetPlatform |
Starts caching of platform specific data for the target platform Called when cooking before serialization so that object can prepare platform specific data Not called during normal loading of objects | |
| void | BeginDestroy () |
Called before destroying the object. | |
| void | GetAssetRegistryTags
(
TArray< FAssetRegistryTag >& OutTags |
Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects | |
| void | GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific). | |
| bool | IsCachedCookedPlatformDataLoaded
(
const ITargetPlatform* TargetPlatform |
Have we finished loading all the cooked platform data for the target platforms requested in BeginCacheForCookedPlatformData | |
| bool | Called to check if the object is ready for FinishDestroy. | ||
| void | PostDuplicate
(
bool bDuplicateForPIE |
Called after duplication & serialization and before PostLoad. | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. | ||
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | PreEditChange
(
FProperty* PropertyAboutToChange |
This is called when a property is about to be modified externally | |
| void | PreSave
(
FObjectPreSaveContext SaveContext |
Presave function. | |
| void | Handles reading, writing, and reference collecting using FArchive. |
Overridden from UObjectBaseUtility
| Type | Name | Description | |
|---|---|---|---|
| bool | Called after load to determine if the object can be a cluster root |
Overridden from INiagaraParameterDefinitionsSubscriber
| Type | Name | Description | |
|---|---|---|---|
| TArray< UNiagaraScriptSourceBase * > | Get all UNiagaraScriptSourceBase of this subscriber. | ||
| TArray< UNiagaraEditorParametersAdapterBase * > | Get All adapters to editor only script vars owned directly by this subscriber. | ||
| TArray< INiagaraParameterDefinitionsSubscriber * > | Get all subscribers that are owned by this subscriber. | ||
| TArray< FParameterDefinitionsSubscription > & | |||
| const TArray< FParameterDefinitionsSubscription > & | |||
| FString | Get the path to the UObject of this subscriber. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FStaticBuffersDeletor |
Typedefs
| Name | Description |
|---|---|
| FOnScalabilityChanged | |
| FOnSystemCompiled | |
| FOnSystemPostEditChange |
Constants
| Name | Description |
|---|---|
| ComputeEmitterExecutionOrderMessageId | |
| kStartNewOverlapGroupBit | When an index inside the EmitterExecutionOrder array has this bit set, it means the corresponding emitter cannot execute in parallel with the previous emitters due to a data dependency. |
| ResolveDIsMessageId |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bExposeToLibrary_DEPRECATED | Deprecated library exposure bool. | |
| bool | bIsTemplateAsset_DEPRECATED | Deprecated template asset bool. Use the TemplateSpecification enum instead. | |
| TMap< FGuid, TObjectPtr< UNiagaraMessageDataBase > > | MessageKeyToMessageMap_DEPRECATED | Messages associated with the System asset. | |
| TArray< FNiagaraSystemScalabilityOverride > | ScalabilityOverrides_DEPRECATED |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| PRAGMA_DISABLE_DEPRECATION_WARNINGSvoid | PreSave
(
const ITargetPlatform* TargetPlatform |
Use version that takes FObjectPreSaveContext instead. |