Navigation
API > API/Plugins > API/Plugins/Niagara
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UFXSystemComponent
- UNiagaraComponent
- UNiagaraCullProxyComponent
References
| Module | Niagara |
| Header | /Engine/Plugins/FX/Niagara/Source/Niagara/Public/NiagaraComponent.h |
| Include | #include "NiagaraComponent.h" |
Syntax
UCLASS&40;ClassGroup&61;&40;Rendering, Common&41;, Blueprintable, HideCategories&61;Object,
HideCategories&61;Physics, HideCategories&61;Collision, ShowCategories&61;Trigger, EditInlineNew,
Meta&61;&40;BlueprintSpawnableComponent, DisplayName&61;"Niagara Particle System Component"&41;,
MinimalAPI&41;
class UNiagaraComponent : public UFXSystemComponent
Remarks
UNiagaraComponent is the primitive component for a Niagara System.
Variables
| Type | Name | Description | |
|---|---|---|---|
| EAttachmentRule | AutoAttachLocationRule | Options for how we handle our location when we attach to the AutoAttachParent, if bAutoManageAttachment is true. | |
| TWeakObjectPtr< USceneComponent > | AutoAttachParent | Component we automatically attach to when activated, if bAutoManageAttachment is true. | |
| EAttachmentRule | AutoAttachRotationRule | Options for how we handle our rotation when we attach to the AutoAttachParent, if bAutoManageAttachment is true. | |
| EAttachmentRule | AutoAttachScaleRule | Options for how we handle our scale when we attach to the AutoAttachParent, if bAutoManageAttachment is true. | |
| FName | AutoAttachSocketName | Socket we automatically attach to on the AutoAttachParent, if bAutoManageAttachment is true. | |
| uint32: 1 | bAutoAttachWeldSimulatedBodies | Option for how we handle bWeldSimulatedBodies when we attach to the AutoAttachParent, if bAutoManageAttachment is true. | |
| uint32: 1 | bAutoManageAttachment | True if we should automatically attach to AutoAttachParent when activated, and detach from our parent when completed. | |
| uint32: 1 | bEnablePreviewLODDistance | ||
| uint32: 1 | bWaitForCompilationOnActivate | ||
| FNiagaraScalabilityState | DebugCachedScalabilityState | Cache our scalability state in the component so we have access to it easily and also after it has been removed from the scalability manager. | |
| float | MaxTimeBeforeForceUpdateTransform | Time between forced UpdateTransforms for systems that use dynamically calculated bounds, Which is effectively how often the bounds are shrunk. | |
| ENiagaraOcclusionQueryMode | OcclusionQueryMode | ||
| FOnNiagaraSystemFinished | OnSystemFinished | Called when the particle system is done. | |
| ENCPoolMethod | PoolingMethod | How to handle pooling for this component instance. | |
| float | PreviewLODDistance | ||
| float | PreviewMaxDistance |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UNiagaraComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AdvanceSimulation
(
int32 TickCount, |
Advances this system's simulation by the specified number of ticks and delta time. | |
| void | AdvanceSimulationByTime
(
float SimulateTime, |
Advances this system's simulation by the specified time in seconds and delta time. | |
| void | |||
| void | ClearEmitterFixedBounds
(
FName EmitterName |
Clear any previously set fixed bounds for the emitter instance. | |
| void | ClearSimCache
(
bool bResetSystem |
Clear any active simulation cache. | |
| void | Clear any previously set fixed bounds for the system instance. | ||
| void | DeclareConstructClasses
(
TArray< FTopLevelAssetPath >& OutConstructClasses, |
||
| void | |||
| void | |||
| void | |||
| void | |||
| FNiagaraVariant | FindParameterOverride
(
const FNiagaraVariableBase& InKey |
Find the value of an overridden parameter. | |
| ENiagaraAgeUpdateMode | |||
| bool | |||
| UNiagaraSystem * | GetAsset () |
||
| FNiagaraVariant | GetCurrentParameterValue
(
const FNiagaraVariableBase& InKey |
Gets the current value of a parameter which is being used by the simulation. | |
| float | |||
| float | Gets the desired age of the System instance. | ||
| FBox | GetEmitterFixedBounds
(
FName EmitterName |
Gets the fixed bounds for an emitter instance. | |
| ENiagaraExecutionState | |||
| bool | |||
| bool | GetForceSolo () |
||
| bool | Gets whether or not the delta time used to tick the system instance when using desired age is locked to the seek delta. | ||
| float | Get the maximum CPU time in seconds we will simulate to the desired age, when we go beyond this limit ticks will be processed in the next frame. | ||
| TArray< FVector > | GetNiagaraParticlePositions_DebugOnly
(
const FString& InEmitterName |
Debug accessors for getting positions in blueprints. | |
| TArray< float > | GetNiagaraParticleValues_DebugOnly
(
const FString& InEmitterName, |
Debug accessors for getting a float attribute array in blueprints. | |
| TArray< FVector > | GetNiagaraParticleValueVec3_DebugOnly
(
const FString& InEmitterName, |
Debug accessors for getting a FVector attribute array in blueprints. | |
| ENiagaraOcclusionQueryMode | |||
| FNiagaraUserRedirectionParameterStore & | |||
| const FNiagaraParameterStore & | |||
| FParticlePerfStatsContext | |||
| float | |||
| bool | |||
| int32 | |||
| bool | Gets whether or not rendering is enabled for this component. | ||
| ENiagaraExecutionState | |||
| int32 | |||
| float | GetSeekDelta () |
Gets the delta value which is used when seeking from the current age, to the desired age. | |
| UNiagaraSimCache * | GetSimCache () |
Get the active simulation cache, will return null if we do not have an active one. | |
| FBox | Gets the fixed bounds for the system instance. | ||
| FNiagaraSystemInstanceControllerPtr | |||
| FNiagaraSystemInstanceControllerConstPtr | |||
| ENiagaraTickBehavior | |||
| bool | HasParameterOverride
(
const FNiagaraVariableBase& InKey |
||
| void | Initializes this component for capturing a performance baseline. | ||
| bool | |||
| bool | IsComplete () |
||
| bool | Is this an effect on or linked to the local player. | ||
| bool | IsPaused () |
||
| bool | |||
| bool | |||
| bool | |||
| void | OnPooledReuse
(
UWorld* NewWorld |
||
| FOnSynchronizedWithAssetParameters & | |||
| FOnSystemInstanceChanged & | |||
| void | |||
| void | Called on when an external object wishes to force this System to reinitialize itself from the System data. | ||
| void | RemoveParameterOverride
(
const FNiagaraVariableBase& InKey |
Remove an override for a given parameter if one exists. | |
| void | ResetSystem () |
Resets the System to it's initial pre-simulated state. | |
| bool | ResolveOwnerAllowsScalability
(
bool bRegister |
||
| void | SeekToDesiredAge
(
float InDesiredAge |
Sets the desired age of the System instance and designates that this change is a seek. | |
| void | SetAgeUpdateMode
(
ENiagaraAgeUpdateMode InAgeUpdateMode |
Sets the age update mode for the System instance. | |
| void | SetAllowScalability
(
bool bAllow |
Set whether this component is allowed to perform scalability checks and potentially be culled etc. | |
| void | SetAsset
(
UNiagaraSystem* InAsset, |
Switch which asset the component is using. | |
| void | SetAutoDestroy
(
bool bInAutoDestroy |
||
| void | SetCanRenderWhileSeeking
(
bool bInCanRenderWhileSeeking |
Sets whether or not the system can render while seeking. | |
| void | SetCustomTimeDilation
(
float Dilation |
Sets the custom time dilation value for the component. | |
| void | SetDesiredAge
(
float InDesiredAge |
Sets the desired age of the System instance. | |
| void | SetEmitterFixedBounds
(
FName EmitterName, |
Sets the fixed bounds for an emitter instance, this overrides all other bounds. | |
| void | SetForceLocalPlayerEffect
(
bool bIsPlayerEffect |
||
| void | SetForceSolo
(
bool bInForceSolo |
||
| void | SetGpuComputeDebug
(
bool bEnableDebug |
||
| void | SetLockDesiredAgeDeltaTimeToSeekDelta
(
bool bLock |
Sets whether or not the delta time used to tick the system instance when using desired age is locked to the seek delta. | |
| void | SetLODDistance
(
float InLODDistance, |
||
| void | SetMaxSimTime
(
float InMaxTime |
Sets the maximum CPU time in seconds we will simulate to the desired age, when we go beyond this limit ticks will be processed in the next frame. | |
| void | |||
| void | SetParameterOverride
(
const FNiagaraVariableBase& InKey, |
||
| void | SetPaused
(
bool bInPaused |
||
| void | SetPreviewLODDistance
(
bool bEnablePreviewLODDistance, |
||
| void | SetRandomSeedOffset
(
int32 NewRandomSeedOffset |
||
| void | SetRenderingEnabled
(
bool bInRenderingEnabled |
Sets whether or not rendering is enabled for this component. | |
| void | SetSeekDelta
(
float InSeekDelta |
Sets the delta value which is used when seeking from the current age, to the desired age. | |
| void | SetSimCache
(
UNiagaraSimCache* SimCache, |
Sets the simulation cache to use for the component. | |
| void | SetSystemFixedBounds
(
FBox LocalBounds |
Sets the fixed bounds for the system instance, this overrides all other bounds. | |
| void | SetSystemSignificanceIndex
(
int32 InIndex |
The significant index for this component. | |
| void | SetTickBehavior
(
ENiagaraTickBehavior NewTickBehavior |
||
| void | Removes all local overrides and replaces them with the values from the source System - note: this also removes the editor overrides from the component as it is used by the pooling mechanism to prevent values leaking between different instances. | ||
| void | SetVariableActor
(
FName InVariableName, |
||
| void | SetVariableBool
(
FName InVariableName, |
Sets a Niagara bool parameter by name, overriding locally if necessary. | |
| void | SetVariableFloat
(
FName InVariableName, |
Sets a Niagara float parameter by name, overriding locally if necessary. | |
| void | SetVariableInt
(
FName InVariableName, |
Sets a Niagara int parameter by name, overriding locally if necessary. | |
| void | SetVariableLinearColor
(
FName InVariableName, |
Sets a Niagara FLinearColor parameter by name, overriding locally if necessary. | |
| void | SetVariableMaterial
(
FName InVariableName, |
||
| void | SetVariableMatrix
(
FName InVariableName, |
Sets a Niagara matrix parameter by name, overriding locally if necessary. | |
| void | SetVariableObject
(
FName InVariableName, |
||
| void | SetVariablePosition
(
FName InVariableName, |
Sets a Niagara Position parameter by name, overriding locally if necessary. | |
| void | SetVariableQuat
(
FName InVariableName, |
Sets a Niagara quaternion parameter by name, overriding locally if necessary. | |
| void | SetVariableStaticMesh
(
FName InVariableName, |
||
| void | SetVariableTexture
(
FName InVariableName, |
||
| void | SetVariableTextureRenderTarget
(
FName InVariableName, |
||
| void | SetVariableVec2
(
FName InVariableName, |
Sets a Niagara Vector2 parameter by name, overriding locally if necessary. | |
| void | SetVariableVec3
(
FName InVariableName, |
Sets a Niagara Vector3 parameter by name, overriding locally if necessary. | |
| void | SetVariableVec4
(
FName InVariableName, |
Sets a Niagara Vector4 parameter by name, overriding locally if necessary. | |
| void |
Overridden from UFXSystemComponent
| Type | Name | Description | |
|---|---|---|---|
| void | ActivateSystem
(
bool bFlagAsJustAttached |
||
| void | Forces component to deactivate immediately. | ||
| uint32 | Returns an approximate memory usage value for this component. | ||
| UFXSystemAsset * | Get the referenced FXSystem asset. | ||
| void | Deactivates this system and releases it to the pool on completion. | ||
| void | SetActorParameter
(
FName ParameterName, |
Set a named actor instance parameter on this ParticleSystemComponent. | |
| void | SetAutoAttachmentParameters
(
USceneComponent* Parent, |
Set AutoAttachParent, AutoAttachSocketName, AutoAttachLocationRule, AutoAttachRotationRule, AutoAttachScaleRule to the specified parameters. | |
| void | SetBoolParameter
(
FName ParameterName, |
Change a named boolean parameter, ParticleSystemComponent converts to float. | |
| void | SetColorParameter
(
FName ParameterName, |
Set a named color instance parameter on this ParticleSystemComponent. | |
| void | SetEmitterEnable
(
FName EmitterName, |
Enables/Disables a sub-emitter | |
| void | SetFloatParameter
(
FName ParameterName, |
Change a named float parameter | |
| void | SetIntParameter
(
FName ParameterName, |
Change a named int parameter | |
| void | SetUseAutoManageAttachment
(
bool bAutoManage |
Sets whether we should automatically attach to AutoAttachParent when activated, and detach from our parent when completed. | |
| void | SetVectorParameter
(
FName ParameterName, |
Set a named vector instance parameter on this ParticleSystemComponent. |
Overridden from UPrimitiveComponent
| Type | Name | Description | |
|---|---|---|---|
| FPrimitiveSceneProxy * | Creates a proxy to represent the primitive to the scene manager in the rendering thread. | ||
| int32 | Return number of material elements in this primitive | ||
| void | GetStreamingRenderAssetInfo
(
FStreamingTextureLevelContext& LevelContext, |
Enumerates the streaming textures/meshes used by the primitive. | |
| void | GetUsedMaterials
(
TArray< UMaterialInterface* >& OutMaterials, |
Retrieves the materials used in this component |
Overridden from USceneComponent
| Type | Name | Description | |
|---|---|---|---|
| FBoxSphereBounds | CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. | |
| bool | IsVisible () |
Returns true if this component is visible in the current context | |
| void | Called when AttachParent changes, to allow the scene to update its attachment state. | ||
| void | OnChildAttached
(
USceneComponent* ChildComponent |
Called after a child scene component is attached to this component. | |
| void | OnChildDetached
(
USceneComponent* ChildComponent |
Called after a child scene component is detached from this component. |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | Activate
(
bool bReset |
Activates the SceneComponent, should be overridden by native child classes. | |
| const UObject * | Give a readable name for this component, including asset name if applicable | ||
| void | ApplyWorldOffset
(
const FVector& InOffset, |
Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location | |
| void | CreateRenderState_Concurrent
(
FRegisterComponentContext* Context |
Used to create any rendering thread information for this component | |
| void | Deactivate () |
Deactivates the SceneComponent. | |
| void | Used to shut down any rendering thread structure for this component | ||
| bool | Overridable check for a component to indicate to its Owner that it should prevent the Actor from auto destroying when finished | ||
| void | Called when a component is created (not loaded). This can happen in the editor or during gameplay | ||
| void | OnComponentDestroyed
(
bool bDestroyingHierarchy |
Called when a component is destroyed | |
| void | Allows components to handle an EOF update happening mid tick. | ||
| void | OnRegister () |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. | |
| void | OnUnregister () |
Called when a component is unregistered. | |
| void | Called after ApplyToComponent has run. | ||
| void | Called to send dynamic data for this component to the rendering thread | ||
| void | TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| 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). | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| 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 | Serialize
(
FStructuredArchive::FRecord Record |
Handles reading, writing, and reference collecting using FArchive. |
Overridden from UObjectBase
| Type | Name | Description | |
|---|---|---|---|
| FName | Overridable method to return a logical name for identification in stats. |
Typedefs
| Name | Description |
|---|---|
| FOnSynchronizedWithAssetParameters | |
| FOnSystemInstanceChanged |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| UNiagaraDataInterface * | GetDataInterface
(
const FString& Name |
This method will be removed in a future release. Use the method provided by the Niagara Function Library instead. | |
| FNiagaraSystemInstance * | This interface is no longer safe to access directly. Use the interface provided by GetSystemInstanceController instead. | ||
| TSharedPtr< FNiagaraSystemSimulation, ESPMode::ThreadSafe > | This interface is no longer safe to access directly. Use the interface provided by GetSystemInstanceController instead. | ||
| void | SetNiagaraVariableActor
(
const FString& InVariableName, |
This method will be removed in a future release. Please update to use the FName variant | |
| void | SetNiagaraVariableBool
(
const FString& InVariableName, |
This method will be removed in a future release. Please update to use the FName variant | |
| void | SetNiagaraVariableFloat
(
const FString& InVariableName, |
This method will be removed in a future release. Please update to use the FName variant | |
| void | SetNiagaraVariableInt
(
const FString& InVariableName, |
This method will be removed in a future release. Please update to use the FName variant | |
| void | SetNiagaraVariableLinearColor
(
const FString& InVariableName, |
This method will be removed in a future release. Please update to use the FName variant | |
| void | SetNiagaraVariableMatrix
(
const FString& InVariableName, |
This method will be removed in a future release. Please update to use the FName variant | |
| void | SetNiagaraVariableObject
(
const FString& InVariableName, |
This method will be removed in a future release. Please update to use the FName variant | |
| void | SetNiagaraVariablePosition
(
const FString& InVariableName, |
This method will be removed in a future release. Please update to use the FName variant | |
| void | SetNiagaraVariableQuat
(
const FString& InVariableName, |
This method will be removed in a future release. Please update to use the FName variant | |
| void | SetNiagaraVariableVec2
(
const FString& InVariableName, |
This method will be removed in a future release. Please update to use the FName variant | |
| void | SetNiagaraVariableVec3
(
const FString& InVariableName, |
This method will be removed in a future release. Please update to use the FName variant | |
| void | SetNiagaraVariableVec4
(
const FString& InVariableName, |
This method will be removed in a future release. Please update to use the FName variant |