UNiagaraComponent

[UNiagaraComponent](API\Plugins\Niagara\UNiagaraComponent) is the primitive component for a Niagara System.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Niagara

Header

/Engine/Plugins/FX/Niagara/Source/Niagara/Public/NiagaraComponent.h

Include

#include "NiagaraComponent.h"

Syntax

UCLASS (ClassGroup=(Rendering, Common), HideCategories=Object, HideCategories=Physics,
       HideCategories=Collision, ShowCategories=Trigger, EditInlineNew,
       Meta=(BlueprintSpawnableComponent, DisplayName="Niagara Particle System"))
class UNiagaraComponent : public UFXSystemComponent

Remarks

UNiagaraComponent is the primitive component for a Niagara System.

Variables

Name Description

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

EAttachmentRule

 

AutoAttachLocationRule

Options for how we handle our location when we attach to the AutoAttachParent, if bAutoManageAttachment is true.

Public variable UProperty Category, Meta BlueprintReadWrite visibleinstanceonly

TWeakObjectPtr <...

 

AutoAttachParent

Component we automatically attach to when activated, if bAutoManageAttachment is true.

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

EAttachmentRule

 

AutoAttachRotationRule

Options for how we handle our rotation when we attach to the AutoAttachParent, if bAutoManageAttachment is true.

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

EAttachmentRule

 

AutoAttachScaleRule

Options for how we handle our scale when we attach to the AutoAttachParent, if bAutoManageAttachment is true.

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

FName

 

AutoAttachSocketName

Socket we automatically attach to on the AutoAttachParent, if bAutoManageAttachment is true.

Public variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

uint32 : 1

 

bAutoAttachWeldSimulatedBodies

Option for how we handle bWeldSimulatedBodies when we attach to the AutoAttachParent, if bAutoManageAttachment is true.

Public variable UProperty Category, EditAnywhere BlueprintReadOnly

uint32 : 1

 

bAutoManageAttachment

Virtual void OnAttachmentChanged() override;

Public variable

uint32 : 1

 

bEnablePreviewLODDistance

Public variable UProperty Category, EditAnywhere

uint32 : 1

 

bWaitForCompilationOnActivate

Public variable UProperty

float

 

MaxTimeBeforeForceUpdateTransform

Time between forced UpdateTransforms for systems that use dynamically calculated bounds, Which is effectively how often the bounds are shrunk.

Public variable UProperty BlueprintAssignable

FOnNiagaraSyste ...

 

OnSystemFinished

Called when the particle system is done.

Public variable

ENCPoolMethod

 

PoolingMethod

How to handle pooling for this component instance.

Public variable

float

 

PreviewLODDistance

Constructors

Name Description

Public function

UNiagaraComponent

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function UFunction BlueprintCallable, Category

void

 

AdvanceSimulation

(
    int32 TickCount,
    float TickDeltaSeconds
)

Advances this system's simulation by the specified number of ticks and delta time.

Public function UFunction BlueprintCallable, Category

void

 

AdvanceSimulationByTime

(
    float SimulateTime,
    float TickDeltaSeconds
)

Advances this system's simulation by the specified time in seconds and delta time.

Public function

void

 

DeactivateImmediate()

Public function

void

 

DestroyInstance()

Public function Const

void

 

EnsureOverrideParametersConsistent()

Public function Const

FNiagaraVari ...

 

FindParameterOverride

(
    const FNiagaraVariableBase & InKey
)

Find the value of an overridden parameter.

Public function Const

bool

 

ForcesSolo()

Returns true if this component forces it's instances to run in "Solo" mode.

Public function Const UFunction BlueprintCallable, Category, Meta

ENiagaraAgeU ...

 

GetAgeUpdateMode()

Public function Const UFunction BlueprintCallable, Category, Meta

UNiagaraSyst ...

 

GetAsset()

Public function UFunction BlueprintCallable, Category

UNiagaraData ...

 

GetDataInterface

(
    const FString & Name
)

Public function Const UFunction BlueprintCallable, Category, Meta

float

 

GetDesiredAge()

Gets the desired age of the System instance.

Public function Const

ENiagaraExec ...

 

GetExecutionState()

Public function Const UFunction BlueprintCallable, Category, Meta

bool

 

GetForceSolo()

Public function Const UFunction BlueprintCallable, Category, Meta

float

 

GetMaxSimTime()

Sets the maximum time that you can jump within a tick which is used when seeking from the current age, to the desired age.

Public function UFunction BlueprintCallable, Category, Meta

TArray < FVec ...

 

GetNiagaraParticlePositions_DebugOnly

(
    const FString & InEmitterName
)

Debug accessors for getting positions in blueprints.

Public function UFunction BlueprintCallable, Category, Meta

TArray < floa...

 

GetNiagaraParticleValues_DebugOnly

(
    const FString & InEmitterName,
    const FString & InValueName
)

Debug accessors for getting a float attribute array in blueprints.

Public function UFunction BlueprintCallable, Category, Meta

TArray < FVec ...

 

GetNiagaraParticleValueVec3_DebugOnly

(
    const FString & InEmitterName,
    const FString & InValueName
)

Debug accessors for getting a FVector attribute array in blueprints.

Public function

FNiagaraUser ...

 

GetOverrideParameters()

Public function Const

const FNiaga ...

 

GetOverrideParameters()

Public function Const UFunction BlueprintCallable, Category, Meta

int32

 

GetPreviewLODDistance()

Public function Const UFunction BlueprintCallable, Category, Meta

bool

 

GetPreviewLODDistanceEnabled()

Public function Const

bool

 

GetRenderingEnabled()

Gets whether or not rendering is enabled for this component.

Public function Const

ENiagaraExec ...

 

GetRequestedExecutionState()

Public function Const

float

 

GetSafeTimeSinceRendered

(
    float WorldTime
)

Public function Const

int32

 

GetScalabilityManagerHandle()

Public function Const UFunction BlueprintCallable, Category, Meta

float

 

GetSeekDelta()

Gets the delta value which is used when seeking from the current age, to the desired age.

Public function Const

FNiagaraSyst ...

 

GetSystemInstance()

Public function

TSharedPtr < ...

 

GetSystemSimulation()

Public function Const

ENiagaraTick ...

 

GetTickBehavior()

Public function Const

bool

 

HasParameterOverride

(
    const FNiagaraVariableBase & InKey
)

Public function

bool

 

InitializeSystem()

Public function Const

bool

 

IsComplete()

Public function Const UFunction BlueprintCallable, Category

bool

 

IsPaused()

Public function Const

bool

 

IsRegisteredWithScalabilityManager()

Public function Const

bool

 

IsWorldReadyToRun()

Public function

FOnSynchroni ...

 

OnSynchronizedWithAssetParameters()

Public function

void

 

OnSystemComplete()

Public function

FOnSystemIns ...

 

OnSystemInstanceChanged()

Public function

void

 

PostLoadNormalizeOverrideNames()

Public function UFunction BlueprintCallable, Category, Meta

void

 

ReinitializeSystem()

Called on when an external object wishes to force this System to reinitialize itself from the System data.

Public function

void

 

RemoveParameterOverride

(
    const FNiagaraVariableBase & InKey
)

Remove an override for a given parameter if one exists.

Public function UFunction BlueprintCallable, Category, Meta

void

 

ResetSystem()

Resets the System to it's initial pre-simulated state.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SeekToDesiredAge

(
    float InDesiredAge
)

Sets the desired age of the System instance and designates that this change is a seek.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetAgeUpdateMode

(
    ENiagaraAgeUpdateMode InAgeUpdateMo...
)

Sets the age update mode for the System instance.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetAllowScalability

(
    bool bAllow
)

Set whether this component is allowed to perform scalability checks and potentially be culled etc.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetAsset

(
    UNiagaraSystem * InAsset
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetAutoDestroy

(
    bool bInAutoDestroy
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetCanRenderWhileSeeking

(
    bool bInCanRenderWhileSeeking
)

Sets whether or not the system can render while seeking.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetDesiredAge

(
    float InDesiredAge
)

Sets the desired age of the System instance.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetForceSolo

(
    bool bInForceSolo
)

Public function

void

 

SetLODDistance

(
    float InLODDistance,
    float InMaxLODDistance
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetMaxSimTime

(
    float InMaxTime
)

Sets the maximum time that you can jump within a tick which is used when seeking from the current age, to the desired age.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetNiagaraVariableActor

(
    const FString & InVariableName,
    AActor * Actor
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetNiagaraVariableBool

(
    const FString & InVariableName,
    bool InValue
)

Sets a Niagara float parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetNiagaraVariableFloat

(
    const FString & InVariableName,
    float InValue
)

Sets a Niagara float parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetNiagaraVariableInt

(
    const FString & InVariableName,
    int32 InValue
)

Sets a Niagara int parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetNiagaraVariableLinearColor

(
    const FString & InVariableName,
    const FLinearColor & InValue
)

Sets a Niagara FLinearColor parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetNiagaraVariableObject

(
    const FString & InVariableName,
    UObject * Object
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetNiagaraVariableQuat

(
    const FString & InVariableName,
    const FQuat & InValue
)

Sets a Niagara Vector3 parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetNiagaraVariableVec2

(
    const FString & InVariableName,
    FVector2D InValue
)

Sets a Niagara Vector3 parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetNiagaraVariableVec3

(
    const FString & InVariableName,
    FVector InValue
)

Sets a Niagara Vector3 parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetNiagaraVariableVec4

(
    const FString & InVariableName,
    const FVector4 & InValue
)

Sets a Niagara Vector4 parameter by name, overriding locally if necessary.

Public function

void

 

SetParameterOverride

(
    const FNiagaraVariableBase & InKey,
    const FNiagaraVariant & InValue
)

Public function UFunction BlueprintCallable, Category

void

 

SetPaused

(
    bool bInPaused
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetPreviewLODDistance

(
    bool bEnablePreviewLODDistance,
    float PreviewLODDistance
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetRenderingEnabled

(
    bool bInRenderingEnabled
)

Sets whether or not rendering is enabled for this component.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetSeekDelta

(
    float InSeekDelta
)

Sets the delta value which is used when seeking from the current age, to the desired age.

Public function

void

 

SetUserParametersToDefaultValues()

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.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetVariableActor

(
    FName InVariableName,
    AActor * Actor
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetVariableBool

(
    FName InVariableName,
    bool InValue
)

Sets a Niagara float parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetVariableFloat

(
    FName InVariableName,
    float InValue
)

Sets a Niagara float parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetVariableInt

(
    FName InVariableName,
    int32 InValue
)

Sets a Niagara int parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetVariableLinearColor

(
    FName InVariableName,
    const FLinearColor & InValue
)

Sets a Niagara FLinearColor parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetVariableMaterial

(
    FName InVariableName,
    UMaterialInterface * Object
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetVariableObject

(
    FName InVariableName,
    UObject * Object
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetVariableQuat

(
    FName InVariableName,
    const FQuat & InValue
)

Sets a Niagara Vector3 parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetVariableVec2

(
    FName InVariableName,
    FVector2D InValue
)

Sets a Niagara Vector3 parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetVariableVec3

(
    FName InVariableName,
    FVector InValue
)

Sets a Niagara Vector3 parameter by name, overriding locally if necessary.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetVariableVec4

(
    FName InVariableName,
    const FVector4 & InValue
)

Sets a Niagara Vector4 parameter by name, overriding locally if necessary.

Public function

void

 

UpgradeDeprecatedParameterOverrides()

Overridden from UFXSystemComponent

Name Description

Public function Virtual Const

uint32

 

GetApproxMemoryUsage()

Returns an approximate memory usage value for this component.

Public function Virtual Const

UFXSystemAss ...

 

GetFXSystemAsset()

Get the referenced FXSystem asset.

Public function Virtual

void

 

ReleaseToPool()

Deactivates this system and releases it to the pool on completion.

Public function Virtual

void

 

SetActorParameter

(
    FName ParameterName,
    AActor * Param
)

Set a named actor instance parameter on this ParticleSystemComponent.

Public function Virtual

void

 

SetAutoAttachmentParameters

(
    USceneComponent * Parent,
    FName SocketName,
    EAttachmentRule LocationRule,
    EAttachmentRule RotationRule,
    EAttachmentRule ScaleRule
)

Set AutoAttachParent, AutoAttachSocketName, AutoAttachLocationRule, AutoAttachRotationRule, AutoAttachScaleRule to the specified parameters.

Public function Virtual

void

 

SetBoolParameter

(
    FName ParameterName,
    bool Param
)

Change a named boolean parameter, ParticleSystemComponent converts to float.

Public function Virtual

void

 

SetColorParameter

(
    FName ParameterName,
    FLinearColor Param
)

Set a named color instance parameter on this ParticleSystemComponent.

Public function Virtual

void

 

SetEmitterEnable

(
    FName EmitterName,
    bool bNewEnableState
)

Enables/Disables a sub-emitter

Public function Virtual

void

 

SetFloatParameter

(
    FName ParameterName,
    float Param
)

Change a named float parameter

Public function Virtual

void

 

SetUseAutoManageAttachment

(
    bool bAutoManage
)

Sets whether we should automatically attach to AutoAttachParent when activated, and detach from our parent when completed.

Public function Virtual

void

 

SetVectorParameter

(
    FName ParameterName,
    FVector Param
)

Set a named vector instance parameter on this ParticleSystemComponent.

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc ...

 

CreateSceneProxy()

Creates a proxy to represent the primitive to the scene manager in the rendering thread.

Public function Virtual Const

int32

 

GetNumMaterials()

Return number of material elements in this primitive

Public function Virtual Const

void

 

GetUsedMaterials

(
    TArray < UMaterialInterface * > ...,
    bool bGetDebugMaterials
)

Retrieves the materials used in this component

Overridden from USceneComponent

Name Description

Public function Virtual Const

FBoxSphereBo ...

 

CalcBounds

(
    const FTransform & LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Public function Virtual

void

 

OnAttachmentChanged()

Called when AttachParent changes, to allow the scene to update its attachment state.

Public function Virtual

void

 

OnChildAttached

(
    USceneComponent * ChildComponen...
)

Called after a child scene component is attached to this component.

Public function Virtual

void

 

OnChildDetached

(
    USceneComponent * ChildComponen...
)

Called after a child scene component is detached from this component.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

Activate

(
    bool bReset
)

Activates the SceneComponent, should be overridden by native child classes.

Public function Virtual Const

const UObjec ...

 

AdditionalStatObject()

Give a readable name for this component, including asset name if applicable

Protected function Virtual

void

 

CreateRenderState_Concurrent

(
    FRegisterComponentContext * Con...
)

Used to create any rendering thread information for this component

Public function Virtual

void

 

Deactivate()

Deactivates the SceneComponent.

Public function Virtual Const

bool

 

IsReadyForOwnerToAutoDestroy()

Overridable check for a component to indicate to its Owner that it should prevent the Actor from auto destroying when finished

Public function Virtual

void

 

OnComponentDestroyed

(
    bool bDestroyingHierarchy
)

Called when a component is destroyed

Protected function Virtual

void

 

OnEndOfFrameUpdateDuringTick()

Allows components to handle an EOF update happening mid tick.

Protected function Virtual

void

 

OnRegister()

Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.

Protected function Virtual

void

 

OnUnregister()

Called when a component is unregistered.

Protected function Virtual

void

 

SendRenderDynamicData_Concurrent()

Called to send dynamic data for this component to the rendering thread

Public function Virtual

void

 

SetComponentTickEnabled

(
    bool bEnabled
)

Set this component's tick functions to be enabled or disabled.

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction * T...
)

Function called every frame on this ActorComponent.

Overridden from UObject

Name Description

Protected function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent & PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

PreEditChange

(
    FProperty * PropertyAboutToChan...
)

This is called when a property is about to be modified externally

Typedefs

Deprecated Functions

Name Description

Public function

bool

 

IsParameterValueOverriddenLocally

(
    const FName & InParamName
)

This function is replaced by HasParameterOverride() .

Public function

void

 

SetParameterValueOverriddenLocally

(
    const FNiagaraVariable & InParam,
    bool bInOverridden,
    bool bRequiresSystemInstanceReset
)

This function is replaced by SetParameterOverride() .

See Also

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback