UNiagaraScript

Runtime script for a Niagara system

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Niagara

Header

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

Include

#include "NiagaraScript.h"

Syntax

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

Remarks

Runtime script for a Niagara system

Variables

Name Description

Public variable UProperty Category, EditAnywhere assetregistrysearchable

uint32: 1

 

bDeprecated

If this script is no longer meant to be used, this option should be set.

Public variable UProperty Category, EditAnywhere

uint32: 1

 

bExperimental

Is this script experimental and less supported?

Public variable UProperty Category, EditAnywhere assetregistrysearchable

uint32: 1

 

bExposeToLibrary

If this script is exposed to the library.

Public variable UProperty Category, EditAnywhere assetregistrysearchable

FText

 

Category

Used to break up scripts of the same Usage type in UI display.

Public variable UProperty Category, EditAnywhere

TSubclassOf< UN...

 

ConversionUtility

Custom logic to convert the contents of an existing script assignment to this script.

Public variable UProperty Category, EditAnywhere, Meta

FText

 

DeprecationMessage

Message to display when the script is deprecated.

Public variable UProperty Category, EditAnywhere, Meta

UNiagaraScript ...

 

DeprecationRecommendation

Which script to use if this is deprecated.

Public variable UProperty Category, EditAnywhere, Meta assetregistrysearchable

FText

 

Description

Public variable UProperty Category, EditAnywhere, Meta

FText

 

ExperimentalMessage

The message to display when a function is marked experimental.

Public variable UProperty Category, EditAnywhere

TArray< FNiagar...

 

Highlights

Public variable UProperty Category, EditAnywhere assetregistrysearchable

FText

 

Keywords

A list of space separated keywords which can be used to find this script in editor menus.

Public variable UProperty Category, EditAnywhere, Meta assetregistrysearchable

int32

 

ModuleUsageBitmask

When used as a module, what are the appropriate script types for referencing this module?

Public variable UProperty Category, EditAnywhere

ENiagaraNumeric...

 

NumericOutputTypeSelectionMode

The mode to use when deducing the type of numeric output pins from the types of the input pins.

Public variable UProperty Category, EditAnywhere

TArray< FName >

 

ProvidedDependencies

Array of Ids of dependencies provided by this module to other modules on the stack (e.g. 'ProvidesNormalizedAge')

Public variable UProperty

FNiagaraParamet...

 

RapidIterationParameters

Contains all of the top-level values that are iterated on in the UI.

Public variable UProperty Category, EditAnywhere

TArray< FNiagar...

 

RequiredDependencies

Dependencies required by this module from other modules on the stack

Public variable UProperty Category, EditAnywhere, Meta displayname

TMap< FName, FS...

 

ScriptMetaData

Public variable UProperty assetregistrysearchable

ENiagaraScriptU...

 

Usage

How this script is to be used. cannot be private due to use of GET_MEMBER_NAME_CHECKED

Constructors

Name Description

Public function

UNiagaraScript

(
    const FObjectInitializer& ObjectIn...
)

Destructors

Name Description

Public function Virtual

~UNiagaraScript()

Functions

Name Description

Public function

FNiagaraShad...

 

AllocateResource()

Public function Const

bool

 

AreScriptAndSourceSynchronized()

Determine if the Script and its source graph are in sync.

Public function Static

bool

 

BinaryToExecData

(
    const TArray< uint8 >& InBinaryDat...,
    FNiagaraVMExecutableData& OutExecD...
)

Helper to convert the struct from its binary data out of the DDC to it's actual in-memory version.

Public function

void

 

CacheResourceShadersForCooking

(
    EShaderPlatform ShaderPlatform,
    TArray< FNiagaraShaderScript* ...
)

Infrastructure for GPU compute Shaders.

Public function

void

 

CacheResourceShadersForRendering

(
    bool bRegenerateId,
    bool bForceRecompile
)

Public function

void

 

CacheShadersForResources

(
    FNiagaraShaderScript* Resource...,
    bool bApplyCompletedShaderMapForRen...,
    bool bForceRecompile,
    bool bCooking
)

Public function Const

bool

 

CanBeRunOnGpu()

Public function Const

void

 

ComputeVMCompilationId

Public function Const

bool

 

ContainsUsage

(
    ENiagaraScriptUsage InUsage
)

Public function Static

bool

 

ConvertUsageToGroup

(
    ENiagaraScriptUsage InUsage,
    ENiagaraScriptGroup& OutGroup
)

Public function Const

bool

 

DidScriptCompilationSucceed

(
    bool bGPUScript
)

Public function Static

bool

 

ExecToBinaryData

(
    TArray< uint8 >& OutBinaryData,
    FNiagaraVMExecutableData& InExecDa...
)

Reverse of the BinaryToExecData() function

Public function

void

 

ForceGraphToRecompileOnNextCheck()

Public function

void

 

GenerateStatScopeIDs()

Public function Const

FGuid

 

GetBaseChangeID()

Public function

TArray< FNia...

 

GetCachedDefaultDataInterfaces()

Public function

TArray< UNia...

 

GetCachedParameterCollectionReferences()

Public function Const

const FNiaga...

 

GetComputedVMCompilationId()

Public function

FText

 

GetDescription()

Public function

FNiagaraScri...

 

GetExecutionReadyParameterStore

(
    ENiagaraSimTarget SimTarget
)

Public function Const

FString

 

GetFriendlyName()

Public function Const

ENiagaraScri...

 

GetLastCompileStatus()

Public function

FString

 

GetNiagaraDDCKeyString()

Creates a string key for the derived data cache

Public function

FNiagaraShad...

 

GetRenderThreadScript()

Public function Const

const FNiaga...

 

GetRenderThreadScript()

Public function

FComputeShad...

 

GetScriptShader()

Public function

FComputeShad...

 

GetScriptShaderGameThread()

Public function Const

const UNiaga...

 

GetSource()

Public function

UNiagaraScri...

 

GetSource()

Public function Const

TArray< ENia...

 

GetSupportedUsageContexts()

Public function Static

TArray< ENia...

 

GetSupportedUsageContextsForBitmask

(
    int32 InModuleUsageBitmask
)

Public function Const

TArray< ENia...

 

GetUnsupportedParameterScopes()

Public function Const

ENiagaraScri...

 

GetUsage()

Public function Const

FGuid

 

GetUsageId()

Public function

FNiagaraVMEx...

 

GetVMExecutableData()

Public function Const

const FNiaga...

 

GetVMExecutableData()

Public function Const

const FNiaga...

 

GetVMExecutableDataCompilationId()

Public function

bool

 

HandleVariableRenames

(
    const TMap< FNiagaraVariable, FNiag...,
    const FString& UniqueEmitterName
)

Public function

void

 

InvalidateCompileResults

(
    const FString& Reason
)

Public function

void

 

InvalidateExecutionReadyParameterStores()

Public function Static

bool

 

IsCompilable

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsCompilable()

Public function Static

bool

 

IsDynamicInputScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsDynamicInputScript()

Public function Const

bool

 

IsEmitterSpawnScript()

Public function Static

bool

 

IsEmitterSpawnScript

(
    ENiagaraScriptUsage Usage
)

Public function Static

bool

 

IsEmitterUpdateScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsEmitterUpdateScript()

Public function Const

bool

 

IsEquivalentUsage

(
    ENiagaraScriptUsage InUsage
)

Public function Static

bool

 

IsEquivalentUsage

(
    ENiagaraScriptUsage InUsageA,
    ENiagaraScriptUsage InUsageB
)

Public function Static

bool

 

IsFunctionScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsFunctionScript()

Public function Static

bool

 

IsGPUScript

(
    ENiagaraScriptUsage Usage
)

Public function Static

bool

 

IsInterpolatedParticleSpawnScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsInterpolatedParticleSpawnScript()

Public function Static

bool

 

IsModuleScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsModuleScript()

Public function Static

bool

 

IsNonParticleScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsNonParticleScript()

Public function Static

bool

 

IsParticleEventScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsParticleEventScript()

Public function Static

bool

 

IsParticleScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsParticleScript()

Public function Const

bool

 

IsParticleSpawnScript()

Public function Static

bool

 

IsParticleSpawnScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsParticleUpdateScript()

Public function Static

bool

 

IsParticleUpdateScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsReadyToRun

(
    ENiagaraSimTarget SimTarget
)

Public function Const

bool

 

IsScriptCompilationPending

(
    bool bGPUScript
)

Public function Const

bool

 

IsSpawnScript()

Public function Static

bool

 

IsSpawnScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsStandaloneScript()

Public function Static

bool

 

IsStandaloneScript

(
    ENiagaraScriptUsage Usage
)

Public function Static

bool

 

IsSystemScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsSystemSpawnScript()

Public function Static

bool

 

IsSystemSpawnScript

(
    ENiagaraScriptUsage Usage
)

Public function Static

bool

 

IsSystemUpdateScript

(
    ENiagaraScriptUsage Usage
)

Public function Const

bool

 

IsSystemUpdateScript()

Public function Static

bool

 

IsUsageDependentOn

(
    ENiagaraScriptUsage InUsageA,
    ENiagaraScriptUsage InUsageB
)

Is usage A dependent on Usage B?

Public function Virtual Const

UNiagaraScri...

 

MakeRecursiveDeepCopy

(
    UObject* DestOuter,
    TMap< const UObject*, UObject ...
)

Makes a deep copy of any script dependencies, including itself.

Public function

void

 

MarkScriptAndSourceDesynchronized

(
    FString Reason
)

Ensure that the Script and its source graph are marked out of sync.

Public function

FOnScriptCom...

 

OnGPUScriptCompiled()

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

Public function

FOnPropertyC...

 

OnPropertyChanged()

Callback issues whenever post edit changed is called on this script.

Public function

FOnScriptCom...

 

OnVMScriptCompiled()

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

Public function UFunction

void

 

RaiseOnGPUCompilationComplete()

Public function

void

 

RequestCompile

(
    bool bForceCompile
)

Request a synchronous compile for the script, possibly forcing it to compile.

Public function

bool

 

RequestExternallyManagedAsyncCompile

(
    const TSharedPtr< FNiagaraCompileRe...,
    FNiagaraVMExecutableDataId& OutCom...,
    uint32& OutAsyncHandle
)

Request an asynchronous compile for the script, possibly forcing it to compile.

Public function

void

 

SetFeatureLevel

(
    ERHIFeatureLevel::Type InFeatureLev...
)

Public function

void

 

SetSource

(
    UNiagaraScriptSourceBase* InSo...
)

Public function

void

 

SetUsage

(
    ENiagaraScriptUsage InUsage
)

Public function

void

 

SetUsageId

(
    FGuid InUsageId
)

Public function

void

 

SetVMCompilationResults

(
    const FNiagaraVMExecutableDataId& ...,
    FNiagaraVMExecutableData& InScript...,
    FNiagaraCompileRequestDataBase*...
)

External call used to identify the values for a successful VM script compilation.

Public function Const

bool

 

ShouldCacheShadersForCooking()

Public function Virtual

void

 

SubsumeExternalDependencies

(
    TMap< const UObject*, UObject ...
)

Determine if there are any external dependencies with respect to scripts and ensure that those dependencies are sucked into the existing package.

Public function

void

 

SyncAliases

(
    const TMap< FString, FString >& Re...
)

Public function

bool

 

SynchronizeExecutablesWithMaster

(
    const UNiagaraScript* Script,
    const TMap< FString, FString >& Re...
)

In the event where we "merge" we duplicate the changes of the master copy onto the newly cloned copy.

Public function Const

bool

 

UsesCollection

(
    const UNiagaraParameterCollection&...
)

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginCacheForCookedPlatformData

(
    const ITargetPlatform* TargetP...
)

Starts caching of platform specific data for the target platform Called when cooking before serialization so that object can prepare platform specific data Not called during normal loading of objects

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

bool

 

IsCachedCookedPlatformDataLoaded

(
    const ITargetPlatform* TargetP...
)

Have we finished loading all the cooked platform data for the target platforms requested in BeginCacheForCookedPlatformData

Public function Virtual Const

bool

 

IsDestructionThreadSafe()

Called during garbage collection to determine if an object can have its destructor called on a worker thread.

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

 

PreSave

(
    const ITargetPlatform* TargetP...
)

Presave function.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Typedefs

Constants

Name

Description

NiagaraCustomVersionTagName

Deprecated Variables

Name Description

Public variable UProperty

int32

 

UsageIndex_DEPRECATED

Which instance of the usage in the graph to use. This is now deprecated and is handled by UsageId.

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