FNiagaraSystemInstance

Windows
MacOS
Linux

References

Module

Niagara

Header

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

Include

#include "NiagaraSystemInstance.h"

Syntax

class FNiagaraSystemInstance

Variables

Name Description

Public variable

uint32

 

ActiveGPUEmitterCount

Public variable

FInstanceParame...

 

GatheredInstanceParameters

Public variable

int32

 

GPUDataInterfaceInstanceDataSize

Public variable

TArray< TPair< ...

 

GPUDataInterfaces

Public variable

bool

 

GPUParamIncludeInterpolation

Public variable

ENiagaraSystemI...

 

SystemInstanceState

Public variable

uint32

 

TotalGPUParamSize

Transient data that is accumulated during tick.

Constructors

Name Description

Public function

FNiagaraSystemInstance

(
    UWorld& InWorld,
    UNiagaraSystem& InAsset,
    FNiagaraUserRedirectionParameterSto...,
    USceneComponent* InAttachCompo...,
    ENiagaraTickBehavior InTickBehavior,
    bool bInPooled
)

Creates a new Niagara system instance.

Destructors

Name Description

Public function Virtual

~FNiagaraSystemInstance()

Cleanup

Functions

Name Description

Public function

void

 

Activate

(
    EResetMode InResetMode
)

Public function

void

 

AdvanceSimulation

(
    int32 TickCountToSimulate,
    float TickDeltaSeconds
)

Manually advances this system's simulation by the specified number of ticks and tick delta.

Public function Static

bool

 

AllocateSystemInstance

(
    TUniquePtr< FNiagaraSystemInstance ...,
    UWorld& InWorld,
    UNiagaraSystem& InAsset,
    FNiagaraUserRedirectionParameterSto...,
    USceneComponent* InAttachCompo...,
    ENiagaraTickBehavior InTickBehavior,
    bool bInPooled
)

Public function

void

 

BindParameters()

Void RebindParameterCollection(UNiagaraParameterCollectionInstance* OldInstance, UNiagaraParameterCollectionInstance* NewInstance);

Public function Const

ETickingGrou...

 

CalculateTickGroup()

Calculates which tick group the instance should be in.

Public function

void

 

Cleanup()

Public function

void

 

ClearEventDataSets()

Public function

void

 

Complete

(
    bool bExternalCompletion
)

Public function

FNiagaraData...

 

CreateEventDataSet

(
    FName EmitterName,
    FName EventName
)

Public function

void

 

Deactivate

(
    bool bImmediate
)

Public function Static

bool

 

DeallocateSystemInstance

Public function Const

void

 

Dump()

Dumps all of this systems info to the log.

Public function

void

 

DumpTickInfo

(
    FOutputDevice& Ar
)

Dumps information about the instances tick to the log

Public function

FNiagaraEmit...

 

EditEmitterParameters

(
    int32 EmitterIdx
)

Public function Const

void

 

EvaluateBoundFunction

(
    FName FunctionName,
    bool& UsedOnCpu,
    bool& UsedOnGpu
)

Public function

void

 

FinalizeTick_GameThread

(
    bool bEnqueueGPUTickIfNeeded
)

Final phase of system instance tick.

Public function

void *

 

FindDataInterfaceInstanceData

(
    UNiagaraDataInterface* Interfa...
)

Returns the instance data for a particular interface for this System.

Public function

void

 

FinishCapture()

Only call from within the script execution states. Does nothing if not capturing a frame.

Public function

void

 

FlipParameterBuffers()

Public function

void

 

GenerateAndSubmitGPUTick()

Public function

TArray< TSha...

 

GetActiveCaptureResults()

Only call from within the script execution states. Value is null if not capturing a frame.

Public function

TSharedPtr< ...

 

GetActiveCaptureWrite

(
    const FName& InHandleName,
    ENiagaraScriptUsage InUsage,
    const FGuid& InUsageId
)

Only call from within the script execution states. Value is nullptr if not capturing a frame.

Public function

ENiagaraExec...

 

GetActualExecutionState()

Public function Const

float

 

GetAge()

Public function Const

bool

 

GetAreDataInterfacesInitialized()

Public function

USceneCompon...

 

GetAttachComponent()

Public function Const

NiagaraEmitt...

 

GetBatcher()

Public function Const

const FStrin...

 

GetCrashReporterTag()

Public function

FNiagaraEmit...

 

GetEmitterByID

(
    FGuid InID
)

Public function Const

TConstArrayV...

 

GetEmitterExecutionOrder()

Public function Const

const FNiaga...

 

GetEmitterParameters

(
    int32 EmitterIdx,
    bool PreviousFrame
)

Public function

TArray< TSha...

 

GetEmitters()

Public function Const

const TArray...

 

GetEmitters()

Public function Const

FNiagaraData...

 

GetEventDataSet

(
    FName EmitterName,
    FName EventName
)

Public function Const

ERHIFeatureL...

 

GetFeatureLevel()

Public function Const

const FNiaga...

 

GetGlobalParameters

(
    bool PreviousFrame
)

Public function Const

FNiagaraSyst...

 

GetId()

Public function

FNiagaraPara...

 

GetInstanceParameters()

Public function Const

bool

 

GetIsolateEnabled()

Public function Const

float

 

GetLastRenderTime()

Public function Const

const FBox &

 

GetLocalBounds()

Public function

float

 

GetLODDistance()

Calculates the distance to use for distance based LODing / culling.

Public function Const

float

 

GetMaxLODDistance()

Public function

FNiagaraUser...

 

GetOverrideParameters()

Public function Const

const FNiaga...

 

GetOverrideParameters()

Public function Const

const FNiaga...

 

GetOwnerParameters

(
    bool PreviousFrame
)

Public function

UNiagaraPara...

 

GetParameterCollectionInstance

(
    UNiagaraParameterCollection* C...
)

Public function Const

uint32

 

GetParameterIndex

(
    bool PreviousFrame
)

Public function Const

const FNiaga...

 

GetPerInstanceDIFunction

(
    ENiagaraSystemSimulationScript Scri...,
    int32 FuncIndex
)

Public function Const

UActorCompon...

 

GetPrereqComponent()

Public function Const

int32

 

GetRandomSeedOffset()

Public function Const

ENiagaraExec...

 

GetRequestedExecutionState()

Public function

TSharedPtr< ...

 

GetSimulationForHandle

(
    const FNiagaraEmitterHandle& Emitt...
)

Gets the simulation for the supplied emitter handle.

Public function Const

UNiagaraSyst...

 

GetSystem()

Public function

FNiagaraSyst...

 

GetSystemGpuComputeProxy()

Public function Const

int32

 

GetSystemInstanceIndex()

Public function Const

const FNiaga...

 

GetSystemParameters

(
    bool PreviousFrame
)

Public function Const

TSharedPtr< ...

 

GetSystemSimulation()

Public function Const

ENiagaraTick...

 

GetTickBehavior()

Get the current tick behavior

Public function Const

int32

 

GetTickCount()

Public function Const

UWorld *

 

GetWorld()

Public function Const

FNiagaraWorl...

 

GetWorldManager()

Public function Const

const FTrans...

 

GetWorldTransform()

Gets the current world transform of the system

Public function

bool

 

HandleCompletion()

Handles completion of the system and returns true if the system is complete.

Public function

bool

 

HandleNeedsUIResync()

Public function

bool

 

HasGPUEmitters()

Void SetHasGPUEmitters(bool bInHasGPUEmitters) { bHasGPUEmitters = bInHasGPUEmitters; }

Public function Const

bool

 

HasPendingFinalize()

Public function

void

 

Init

(
    bool bInForceSolo
)

Initializes this System instance to simulate the supplied System.

Public function

void

 

InitGPUTick

(
    FNiagaraGPUSystemTick& OutTick
)

Public function Const

bool

 

IsComplete()

Int32 GetNumParticles(int32 EmitterIndex) const { return ParameterNumParticleBindings[EmitterIndex].GetValue(); } float GetSpawnCountScale(int32 EmitterIndex) const { return ParameterSpawnCountScaleBindings[EmitterIndex].GetValue(); }

Public function Const

bool

 

IsDisabled()

Public function Const

bool

 

IsPaused()

Public function Const

bool

 

IsPendingSpawn()

Public function Const

bool

 

IsReadyToRun()

Public function Const

bool

 

IsSolo()

Public function

void

 

ManualTick

(
    float DeltaSeconds,
    const FGraphEventRef& MyCompletion...
)

Public function Const

bool

 

NeedsGPUTick()

Public function

FOnDestroyed...

 

OnDestroyed()

Public function

FOnInitializ...

 

OnInitialized()

Gets a multicast delegate which is called whenever this instance is initialized with an System asset.

Public function

void

 

OnPooledReuse

(
    UWorld& NewWorld
)

Public function

FOnReset &

 

OnReset()

Gets a multicast delegate which is called whenever this instance is reset due to external changes in the source System asset.

Public function

void

 

OnSimulationDestroyed()

Public function

bool

 

QueryCaptureResults

(
    const FGuid& RequestId,
    TArray< TSharedPtr< struct FNiagara...
)

Poll for previous frame capture requests.

Public function

void

 

RaiseNeedsUIResync()

Public function

bool

 

RequestCapture

(
    const FGuid& RequestId
)

Request that this simulation capture a frame. Cannot capture if disabled or already completed.

Public function Const

bool

 

RequiresDepthBuffer()

Public function Const

bool

 

RequiresDistanceFieldData()

Public function Const

bool

 

RequiresEarlyViewData()

Public function Const

bool

 

RequiresViewUniformBuffer()

Public function

void

 

Reset

(
    EResetMode Mode
)

Requests the the simulation be reset on the next tick.

Public function

void

 

SetActualExecutionState

(
    ENiagaraExecutionState InState
)

Public function

void

 

SetEmitterEnable

(
    FName EmitterName,
    bool bNewEnableState
)

Public function

void

 

SetGpuComputeDebug

(
    bool bEnableDebug
)

Public function

void

 

SetLastRenderTime

(
    float TimeSeconds
)

Public function

void

 

SetLODDistance

(
    float InLODDistance,
    float InMaxLODDistance
)

Public function

void

 

SetOnComplete

(
    const FOnComplete& InOnCompleteDel...
)

Gets a multicast delegate which is called whenever this instance is complete.

Public function

void

 

SetOnPostTick

(
    const FOnPostTick& InPostTickDeleg...
)

Gets a multicast delegate which is called after this instance has finished ticking for the frame on the game thread

Public function

void

 

SetPaused

(
    bool bInPaused
)

Public function

void

 

SetPendingFinalize

Public function

void

 

SetRandomSeedOffset

(
    int32 Offset
)

Public function

void

 

SetRequestedExecutionState

(
    ENiagaraExecutionState InState
)

Public function

void

 

SetSolo

(
    bool bInSolo
)

Public function

void

 

SetSystemSignificanceIndex

(
    int32 InIndex
)

The significant index for this component.

Public function

void

 

SetTickBehavior

(
    ENiagaraTickBehavior NewTickBehavio...
)

Set a new tick behavior, this will not move the instance straight away and will wait until the next time it is evaluated

Public function

void

 

SetWorldTransform

(
    const FTransform& InTransform
)

Sets the world transform

Public function Const

bool

 

ShouldCaptureThisFrame()

Only call from within the script execution states. Value is false if not capturing a frame.

Public function

void

 

Tick_Concurrent

(
    bool bEnqueueGPUTickIfNeeded
)

Secondary phase of the system instance tick that can be executed on any thread.

Public function

void

 

Tick_GameThread

(
    float DeltaSeconds
)

Initial phase of system instance tick. Must be executed on the game thread.

Public function

void

 

TickDataInterfaces

(
    float DeltaSeconds,
    bool bPostSimulate
)

Perform per-tick updates on data interfaces that need it.

Public function

void

 

TickInstanceParameters_Concurrent()

Public function

void

 

TickInstanceParameters_GameThread

(
    float DeltaSeconds
)

Public function

void

 

UnbindParameters

(
    bool bFromComplete
)

Public function Const

bool

 

UsesCollection

(
    const UNiagaraParameterCollection&...
)

Bool UsesDataInterface(UNiagaraDataInterface* Interface);

Public function Const

bool

 

UsesEmitter

(
    const UNiagaraEmitter* Emitter
)

Public function Const

bool

 

UsesScript

(
    const UNiagaraScript* Script
)

Public function

void

 

WaitForConcurrentTickAndFinalize

(
    bool bEnsureComplete
)

Wait for any pending concurrent work to complete, must be called on the GameThread.

Public function

void

 

WaitForConcurrentTickDoNotFinalize

(
    bool bEnsureComplete
)

Wait for any pending concurrent work to complete, must be called on the GameThread.

Classes

Name

Description

Public struct

FInstanceParameters

Enums

Name

Description

Public enum

EResetMode

Defines modes for resetting the System instance.

Typedefs

Name

Description

EmitterEventKey

Registered events for each of the emitters

EventDataSetMap

FOnComplete

FOnDestroyed

FOnInitialized

FOnPostTick

FOnReset

Constants

Name

Description

ParameterBufferCount

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