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](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(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

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

Public variable

uint32: 1

 

bEnablePreviewLODDistance

Public variable UProperty Category, EditAnywhere

uint32: 1

 

bWaitForCompilationOnActivate

Public variable

FNiagaraScalabi...

 

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.

Public variable UProperty Transient duplicatetransient

TArray< FNiagar...

 

EmitterMaterials

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

 

BeginUpdateContextReset()

Public function

void

 

DestroyInstance()

Public function

void

 

EndUpdateContextReset()

Public function Const

void

 

EnsureOverrideParametersConsistent()

Public function Const

FNiagaraVari...

 

FindParameterOverride

(
    const FNiagaraVariableBase& InKey
)

Find the value of an overridden parameter.

Public function Const UFunction BlueprintCallable, Category, Meta

ENiagaraAgeU...

 

GetAgeUpdateMode()

Public function Const UFunction BlueprintCallable, Category, Meta

UNiagaraSyst...

 

GetAsset()

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

bool

 

GetLockDesiredAgeDeltaTimeToSeekDelta()

Gets whether or not the delta time used to tick the system instance when using desired age is locked to the seek delta.

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

FParticlePer...

 

GetPerfStatsContext()

Public function Const UFunction BlueprintCallable, Category, Meta

float

 

GetPreviewLODDistance()

Public function Const UFunction BlueprintCallable, Category, Meta

bool

 

GetPreviewLODDistanceEnabled()

Public function Const UFunction BlueprintCallable, Category, Meta

int32

 

GetRandomSeedOffset()

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 UFunction BlueprintCallable, Category, Meta

ENiagaraTick...

 

GetTickBehavior()

Public function Const

bool

 

HasParameterOverride

(
    const FNiagaraVariableBase& InKey
)

Public function UFunction BlueprintCallable, Category, Meta

void

 

InitForPerformanceBaseline()

Initializes this component for capturing a performance baseline.

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

void

 

OnPooledReuse

(
    UWorld* NewWorld
)

Public function

FOnSynchroni...

 

OnSynchronizedWithAssetParameters()

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,
    bool bResetExistingOverrideParamete...
)

Switch which asset the component is using.

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 UFunction BlueprintCallable, Category

void

 

SetGpuComputeDebug

(
    bool bEnableDebug
)

Public function UFunction BlueprintCallable, Category, Meta

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.

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

 

SetRandomSeedOffset

(
    int32 NewRandomSeedOffset
)

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

 

SetSystemSignificanceIndex

(
    int32 InIndex
)

The significant index for this component.

Public function UFunction BlueprintCallable, Category, Meta

void

 

SetTickBehavior

(
    ENiagaraTickBehavior NewTickBehavio...
)

Public function

void

 

SetUserParametersToDefaultValues()

Removes all local overrides and replaces them with the values from the source System -

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

 

SetVariableTextureRenderTarget

(
    FName InVariableName,
    UTextureRenderTarget* TextureR...
)

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.

Protected function

void

 

UpdateEmitterMaterials

(
    bool bForceUpdateEmitterMaterials
)

Public function

void

 

UpgradeDeprecatedParameterOverrides()

Overridden from UFXSystemComponent

Name Description

Public function Virtual

void

 

ActivateSystem

(
    bool bFlagAsJustAttached
)

Public function Virtual

void

 

DeactivateImmediate()

Forces component to deactivate immediately.

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

 

SetIntParameter

(
    FName ParameterName,
    int Param
)

Change a named int 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.

Protected function Virtual

void

 

DestroyRenderState_Concurrent()

Used to shut down any rendering thread structure for this component

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

 

OnComponentCreated()

Called when a component is created (not loaded). This can happen in the editor or during gameplay

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

Public function Virtual

void

 

Serialize

(
    FStructuredArchive::FRecord Record
)

Handles reading, writing, and reference collecting using FArchive.

Typedefs

Deprecated Functions

Name Description

Public function UFunction BlueprintCallable, Category

UNiagaraData...

 

GetDataInterface

(
    const FString& Name
)

This method will be removed in a future release. Use the method provided by the Niagara Function Library instead.

See Also

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss