UNiagaraEmitter

[UNiagaraEmitter](API\Plugins\Niagara\UNiagaraEmitter) stores the attributes of an [FNiagaraEmitterInstance](API\Plugins\Niagara\FNiagaraEmitterInstance) that need to be serialized and are used for its initialization

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Niagara

Header

/Engine/Plugins/FX/Niagara/Source/Niagara/Classes/NiagaraEmitter.h

Include

#include "NiagaraEmitter.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(MinimalAPI)
class UNiagaraEmitter :
    public UObject,
    public INiagaraParameterDefinitionsSubscriber

Remarks

UNiagaraEmitter stores the attributes of an FNiagaraEmitterInstance that need to be serialized and are used for its initialization

Variables

Name Description

Public variable UProperty Category, EditAnywhere, AdvancedDisplay

EParticleAlloca...

 

AllocationMode

The emitter needs to allocate memory for the particles each tick.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay

TArray< FString...

 

AttributesToPreserve

A whitelist of Particle attributes (e.g. "Particle.Position" or "Particle.Age") that will not be removed from the DataSet even if they aren't read by the VM.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta

uint32: 1

 

bBakeOutRapidIteration

Should we enable rapid iteration removal if the system is also set to remove rapid iteration parameters on compile? This value defaults to true.

Public variable UProperty Category, EditAnywhere

uint32: 1

 

bCombineEventSpawn

Performance option to allow event based spawning to be combined into a single spawn.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta

uint32: 1

 

bDeprecatedShaderStagesEnabled

Get whether or not to use shader stages.

Public variable UProperty Category, EditAnywhere

bool

 

bDeterminism

Toggles whether to globally make the random number generator be deterministic or non-deterministic.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay assetregistrysearchable

bool

 

bExposeToLibrary

If this emitter is exposed to the library.

Public variable UProperty Category, EditAnywhere, Meta

uint32: 1

 

bFixedBounds

Whether or not fixed bounds are enabled.

Public variable UProperty Category, EditAnywhere

uint32: 1

 

bInterpolatedSpawning

When enabled, this will spawn using interpolated parameter values and perform a partial update at spawn time.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta

uint32: 1

 

bLimitDeltaTime

Whether to limit the max tick delta time or not.

Public variable UProperty Category, EditAnywhere

bool

 

bLocalSpace

Toggles whether or not the particles within this emitter are relative to the emitter origin or in global space.

Public variable UProperty Category, EditAnywhere

uint32: 1

 

bRequiresPersistentIDs

Do particles in this emitter require a persistent ID?

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta

uint32: 1

 

bSimulationStagesEnabled

Get whether or not to use simulation stages.

Public variable UProperty Category, EditAnywhere assetregistrysearchable

FText

 

Category

Category to collate this emitter into for "add new emitter" dialogs.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta

uint32

 

DefaultShaderStageIndex

Get the default shader stage index.

Public variable UProperty

FNiagaraEmitter...

 

EmitterSpawnScriptProps

Public variable UProperty

FNiagaraEmitter...

 

EmitterUpdateScriptProps

Public variable UProperty Category, EditAnywhere, Meta

FBox

 

FixedBounds

The fixed bounding box value. bFixedBounds is the condition whether the fixed bounds can be edited.

Public variable UProperty

UNiagaraScriptS...

 

GraphSource

'Source' data/graphs for the scripts used by this emitter.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta

float

 

MaxDeltaTimePerTick

Limits the delta time per tick to prevent simulation spikes due to frame lags.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta

uint32

 

MaxUpdateIterations

Get the number of shader stages that we fire off.

Public variable UProperty

TArray< UNiagar...

 

ParentScratchPadScripts

Public variable UProperty Category, EditAnywhere

FNiagaraPlatfor...

 

Platforms

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta

int32

 

PreAllocationCount

The emitter will allocate at least this many particles on it's first tick.

Public variable UProperty Category, EditAnywhere, Meta

int32

 

RandomSeed

An emitter-based seed for the deterministic random number generator.

Public variable UProperty Category, EditAnywhere

FNiagaraEmitter...

 

ScalabilityOverrides

Public variable UProperty

TArray< UNiagar...

 

ScratchPadScripts

Public variable UProperty Category, EditAnywhere

ENiagaraSimTarg...

 

SimTarget

Public variable UProperty

FNiagaraEmitter...

 

SpawnScriptProps

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta

TSet< uint32 >

 

SpawnStages

Get whether or not shaderstages spwn.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay assetregistrysearchable

FText

 

TemplateAssetDescription

Public variable UProperty Category, EditAnywhere, AdvancedDisplay assetregistrysearchable

ENiagaraScriptT...

 

TemplateSpecification

Public variable UProperty

UTexture2D *...

 

ThumbnailImage

Internal: The thumbnail image.

Public variable UProperty

uint32: 1

 

ThumbnailImageOutOfDate

Internal: Indicates the thumbnail image is out of date.

Public variable UProperty

FNiagaraEmitter...

 

UpdateScriptProps

Constructors

Name Description

Public function

UNiagaraEmitter

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

AddEventHandler

(
    FNiagaraEventScriptProperties Event...
)

Public function

void

 

AddMessage

(
    const FGuid& MessageKey,
    UNiagaraMessageDataBase* NewMe...
)

Public function

void

 

AddRenderer

(
    UNiagaraRendererProperties* Re...
)

Public function

int32

 

AddRuntimeAllocation

(
    uint64 ReporterHandle,
    int32 AllocationCount
)

This is used by the emitter instances to report runtime allocations to reduce reallocation in future simulation runs.

Public function

void

 

AddSimulationStage

(
    UNiagaraSimulationStageBase* S...
)

Public function Const

bool

 

AreAllScriptAndSourcesSynchronized()

Public function

void

 

BindNotifications()

Helper method for binding the notifications needed for proper editor integration.

Public function

void

 

CacheFromCompiledData

(
    const FNiagaraDataSetCompiledData&...
)

Public function

void

 

CacheFromShaderCompiled()

Public function Const

bool

 

CanObtainEmitterAttribute

(
    const FNiagaraVariableBase& InVarW...
)

Public function Const

bool

 

CanObtainParticleAttribute

(
    const FNiagaraVariableBase& InVar
)

Public function Const

bool

 

CanObtainSystemAttribute

(
    const FNiagaraVariableBase& InVar
)

Public function Const

bool

 

CanObtainUserVariable

(
    const FNiagaraVariableBase& InVar
)

Public function

void

 

ClearRuntimeAllocationEstimate

(
    uint64 ReportHandle
)

Public function Static

UNiagaraEmit...

 

CreateAsDuplicate

(
    const UNiagaraEmitter& InEmitterTo...,
    FName InDuplicateName,
    UNiagaraSystem& InDuplicateOwnerSy...
)

Creates a new emitter by duplicating an existing emitter.

Public function Static

UNiagaraEmit...

 

CreateWithParentAndOwner

(
    UNiagaraEmitter& InParentEmitter,
    UObject* InOwner,
    FName InName,
    EObjectFlags FlagMask
)

Creates a new emitter with the supplied emitter as a parent emitter and the supplied system as its owner.

Public function

UNiagaraEmit...

 

DuplicateWithoutMerging

(
    UObject* InOuter
)

Duplicates this emitter, but prevents the duplicate from merging in changes from the parent emitter.

Public function Const

void

 

ForEachEnabledRenderer

(
    TAction Func
)

Public function Const

void

 

ForEachScript

(
    TAction Func
)

Public function Const

TConstArrayV...

 

GetBoundsCalculators()

Public function Const

FGuid

 

GetChangeId()

Gets a Guid which is updated any time data in this emitter is changed.

Public function Const

const TCHAR ...

 

GetDebugSimName()

Public function Const

UNiagaraEdit...

 

GetEditorData()

Public function

UNiagaraEdit...

 

GetEditorParameters()

Public function

FNiagaraEven...

 

GetEventHandlerByIdUnsafe

(
    FGuid ScriptUsageId
)

Gets a pointer to an event handler by script usage id.

Public function Const

const TArray...

 

GetEventHandlers()

Public function Static

bool

 

GetForceCompileOnLoad()

Public function Const

const UNiaga...

 

GetGPUComputeScript()

Public function

UNiagaraScri...

 

GetGPUComputeScript()

Public function Const

uint32

 

GetMaxInstanceCount()

Public function

int32

 

GetMaxParticleCountEstimate()

Returns the number of max expected particles for memory allocations.

Public function Const

const TMap< ...

 

GetMessages()

Public function Const

UNiagaraEmit...

 

GetParent()

Public function Const

UNiagaraEmit...

 

GetParentAtLastMerge()

Public function Const

const TArray...

 

GetRenderers()

Public function Const

const FNiaga...

 

GetScalabilitySettings()

Public function

UNiagaraScri...

 

GetScript

(
    ENiagaraScriptUsage Usage,
    FGuid UsageId
)

Public function Const

void

 

GetScripts

(
    TArray< UNiagaraScript* >& Ou...,
    bool bCompilableOnly,
    bool bEnabledOnly
)

Public function Const

UNiagaraSimu...

 

GetSimulationStageById

(
    FGuid ScriptUsageId
)

Public function Const

const TArray...

 

GetSimulationStages()

Public function Const

TStatId

 

GetStatID

(
    bool bGameThread,
    bool bConcurrent
)

Public function Const

FString

 

GetUniqueEmitterName()

Public function

void

 

HandleVariableRemoved

(
    const FNiagaraVariable& InOldVaria...,
    bool bUpdateContexts
)

Helper method for when a rename has been detected within the graph.

Public function

void

 

HandleVariableRenamed

(
    const FNiagaraVariable& InOldVaria...,
    const FNiagaraVariable& InNewVaria...,
    bool bUpdateContexts
)

Helper method for when a rename has been detected within the graph.

Public function

void

 

InvalidateCompileResults()

Public function Const

bool

 

IsAllowedByScalability()

Returns true if this emitter's platform filter allows it on this platform and quality level.

Public function Const

bool

 

IsEnabledOnPlatform

(
    const FString& PlatformName
)

Public function Const

bool

 

IsEventGeneratorShared

(
    FName EventGeneratorId
)

Gets whether or not the supplied event generator id matches an event generator which is shared between the particle spawn and update scrips.

Public function Const

bool

 

IsReadyToRun()

Public function Const

bool

 

IsSynchronizedWithParent()

Whether or not this emitter is synchronized with its parent emitter.

Public function Const

bool

 

IsValid()

Public function

INiagaraMerg...

 

MergeChangesFromParent()

Merges in any changes from the parent emitter into this emitter.

Public function

void

 

MoveSimulationStageToIndex

(
    UNiagaraSimulationStageBase* S...,
    int32 TargetIndex
)

Public function Virtual Const

bool

 

NeedsLoadForTargetPlatform

(
    const ITargetPlatform* TargetP...
)

Public function

void

 

NotifyScratchPadScriptsChanged()

Public function

FOnEmitterCo...

 

OnEmitterGPUCompiled()

Callback issued whenever a VM compilation successfully happened (even if the results are a script that cannot be executed due to errors)

Public function

FOnEmitterCo...

 

OnEmitterVMCompiled()

Callback issued whenever a VM compilation successfully happened (even if the results are a script that cannot be executed due to errors)

Public function

FOnEmitterCo...

 

OnGPUCompilationComplete()

Callback issued whenever a GPU compilation successfully happened (even if the results are a script that cannot be executed due to errors)

Public function

void

 

OnPostCompile()

Public function

FOnPropertie...

 

OnPropertiesChanged()

Public function

FOnRenderers...

 

OnRenderersChanged()

Public function

void

 

OnScalabilityCVarChanged()

Public function

void

 

RemoveEventHandlerByUsageId

(
    FGuid EventHandlerUsageId
)

Public function

void

 

RemoveMessage

(
    const FGuid& MessageKey
)

Public function

void

 

RemoveMessageDelegateable

(
    const FGuid MessageKey
)

Public function

void

 

RemoveParent()

Public function

void

 

RemoveRenderer

(
    UNiagaraRendererProperties* Re...
)

Public function

void

 

RemoveSimulationStage

(
    UNiagaraSimulationStageBase* S...
)

Public function

NIAGARA_API ...

 

Reparent

(
    UNiagaraEmitter& InParent
)

Public function Const

bool

 

RequiresPersistentIDs()

Public function Const

bool

 

RequiresViewUniformBuffer()

Protected function

void

 

ResolveScalabilitySettings()

Public function

void

 

SetEditorData

(
    UNiagaraEditorDataBase* InEdit...
)

Public function

void

 

SetParent

(
    UNiagaraEmitter& InParent
)

Public function

bool

 

SetUniqueEmitterName

(
    const FString& InName
)

Public function

void

 

UpdateEmitterAfterLoad()

Public function Const

bool

 

UsesCollection

(
    const UNiagaraParameterCollection&...
)

Bool UsesDataInterface(UNiagaraDataInterface* Interface);

Public function Const

bool

 

UsesEmitter

(
    const UNiagaraEmitter& InEmitter
)

Whether or not this emitter uses the supplied emitter

Public function Const

bool

 

UsesScript

(
    const UNiagaraScript* Script
)

Overridden from UObject

Name Description

Protected function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual Const

void

 

GetAssetRegistryTags

(
    TArray< FAssetRegistryTag >& OutTa...
)

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

Public function Virtual Const

bool

 

IsEditorOnly()

Called during saving to determine if the object is forced to be editor only or not

Public function Virtual

void

 

PostDuplicate

(
    EDuplicateMode::Type DuplicateMode
)

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Public function Virtual

void

 

PostLoad()

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

Public function Virtual

void

 

PostRename

(
    UObject* OldOuter,
    const FName OldName
)

Called at the end of Rename(), but only if the rename was actually carried out

Public function Virtual

void

 

PreSave

(
    const ITargetPlatform* TargetP...
)

Presave function.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Overridden from INiagaraParameterDefinitionsSubscriber

Name Description

Public function Virtual

TArray< UNia...

 

GetAllSourceScripts()

Get all UNiagaraScriptSourceBase of this subscriber.

Public function Virtual

TArray< UNia...

 

GetEditorOnlyParametersAdapters()

Get All adapters to editor only script vars owned directly by this subscriber.

Public function Virtual Const

const TArray...

 

GetParameterDefinitionsSubscriptions()

Public function Virtual

TArray< FPar...

 

GetParameterDefinitionsSubscriptions()

Public function Virtual Const

FString

 

GetSourceObjectPathName()

Get the path to the UObject of this subscriber.

Classes

Name

Description

Public struct

PrivateMemberNames

Typedefs

Deprecated Variables

Name Description

Public variable UProperty

bool

 

bIsTemplateAsset_DEPRECATED

Public variable UProperty

uint32: 1

 

bOverrideGlobalSpawnCountScale_DEPRECATED

Legacy bool to control overriding the global spawn count scales.

Public variable UProperty

uint32: 1

 

bUseMaxDetailLevel_DEPRECATED

Whether to use the min detail or not.

Public variable UProperty

uint32: 1

 

bUseMinDetailLevel_DEPRECATED

Whether to use the min detail or not.

Public variable UProperty

FNiagaraDetails...

 

GlobalSpawnCountScaleOverrides_DEPRECATED

Public variable UProperty

int32

 

MaxDetailLevel_DEPRECATED

Public variable UProperty

int32

 

MinDetailLevel_DEPRECATED

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