Navigation
API > API/Plugins > API/Plugins/NiagaraEditor
| Name | UNiagaraGraph |
| Type | class |
| Header File | /Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Public/NiagaraGraph.h |
| Include Path | #include "NiagaraGraph.h" |
Syntax
UCLASS (MinimalAPI)
class UNiagaraGraph : public UEdGraph
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UEdGraph → UNiagaraGraph
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UNiagaraGraph() |
NiagaraGraph.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FFindInputNodeOptions | FNiagaraFindInputNodeOptions | NiagaraGraph.h | |
| FOnDataInterfaceChanged | TMulticastDelegate_NoParams< void > | NiagaraGraph.h | |
| FOnGetParameterDefinitionsForDetailsCustomization | TBaseDelegate_OneParam< TArray< UNiagaraParameterDefinitions * >, bool > | NiagaraGraph.h | |
| FOnParametersChanged | TMulticastDelegate_OneParam< void, TOptional< TInstancedStruct< FNiagaraParametersChangedData > > ParametersChangedData > | NiagaraGraph.h | |
| FOnSubObjectSelectionChanged | TMulticastDelegate_OneParam< void, const UObject * > | NiagaraGraph.h | |
| FScriptVariableMap | TMap< FNiagaraVariable, TObjectPtr< UNiagaraScriptVariable > > | These functions are not supported for compilation copies. | NiagaraGraph.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bHasValidLastBuiltScriptVersionId | bool | Used in conjunction with LastBuiltScriptVersionId to note that we've got a valid script Id stored. | NiagaraGraph.h | |
| bIsForCompilationOnly | bool | NiagaraGraph.h | ||
| bIsRenamingParameter | bool | Whether currently renaming a parameter to prevent recursion. | NiagaraGraph.h | |
| bParameterReferenceRefreshPending | bool | NiagaraGraph.h | ||
| CachedUsageInfo | TArray< FNiagaraGraphScriptUsageInfo > | NiagaraGraph.h | ||
| ChangeId | FGuid | The current change identifier for this graph overall. Used to sync status with UNiagaraScripts. | NiagaraGraph.h | |
| CompilationScriptVariables | TArray< FNiagaraScriptVariableData > | NiagaraGraph.h |
|
|
| ForceRebuildId | FGuid | Internal value used to invalidate a DDC key for the script no matter what. | NiagaraGraph.h | |
| LastBuiltScriptVersionId | FGuid | The script version that was used when the cached CompileId was generated, a change in script version will invalidate the cached CompileId and a new one will be generated. | NiagaraGraph.h | |
| LastBuiltTraversalDataChangeId | FGuid | NiagaraGraph.h | ||
| OnDataInterfaceChangedDelegate | FOnDataInterfaceChanged | NiagaraGraph.h | ||
| OnGetParameterDefinitionsForDetailsCustomizationDelegate | FOnGetParameterDefinitionsForDetailsCustomization | NiagaraGraph.h | ||
| OnGraphNeedsRecompile | FOnGraphChanged | A delegate that broadcasts a notification whenever the graph needs recompile due to structural change. | NiagaraGraph.h | |
| OnParametersChangedDelegate | FOnParametersChanged | NiagaraGraph.h | ||
| OnSelectedSubObjectChanged | FOnSubObjectSelectionChanged | NiagaraGraph.h | ||
| ParameterHierarchyRoot | TObjectPtr< UHierarchyRoot > | NiagaraGraph.h | ||
| ParameterToReferencesMap | TMap< FNiagaraVariable, FNiagaraGraphParameterReferenceCollection > | A map of parameters in the graph to their referencers. | NiagaraGraph.h |
|
| VariableToScriptVariable | TMap< FNiagaraVariable, TObjectPtr< UNiagaraScriptVariable > > | Storage of variables defined for use with this graph. | NiagaraGraph.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FDelegateHandle AddOnGraphNeedsRecompileHandler
(
const FOnGraphChanged::FDelegate& InHandler |
Add a listener for OnGraphNeedsRecompile events | NiagaraGraph.h | |
UNiagaraScriptVariable * AddParameter
(
const FNiagaraVariable& Parameter, |
NiagaraGraph.h | ||
UNiagaraScriptVariable * AddParameter
(
const FNiagaraVariable& Parameter, |
Adds parameter to the VariableToScriptVariable map. | NiagaraGraph.h | |
UNiagaraScriptVariable * AddParameter
(
const UNiagaraScriptVariable* InScriptVar |
NiagaraGraph.h | ||
void AddParameterReference
(
const FNiagaraVariable& Parameter, |
Adds an FNiagaraGraphParameterReference to the ParameterToReferenceMap. | NiagaraGraph.h | |
void BuildTraversal
(
TArray< class UNiagaraNode* >& OutNodesTraversed, |
Get an in-order traversal of a graph by the specified target output script usage. | NiagaraGraph.h | |
void ChangeParameterType
(
const TArray< FNiagaraVariable >& ParametersToChange, |
Changes the type of existing graph parameters. | NiagaraGraph.h | |
const TMap< FNiagaraVariable, FInputPinsAndOutputPins > CollectVarsToInOutPinsMap() |
Helper to get a map of variables to all input/output pins with the same name. | NiagaraGraph.h | |
void ConditionalRebuildCompileIdCache() |
In order to support reducing the number of times we need to fully generate the CompileId this function is introduced to work with LastBuiltScriptVersionId & bHasValidLastBuiltScriptVersionId. | NiagaraGraph.h | |
| Rebuilds the internally stored ParameterRefrenceMap if it has been marked dirty. | NiagaraGraph.h | ||
void CopyCachedReferencesMap
(
UNiagaraGraph* TargetGraph |
NiagaraGraph.h | ||
UNiagaraGraph * CreateCompilationCopy
(
const TArray< ENiagaraScriptUsage >& CompileUsages |
Creates a transient copy of this graph for compilation purposes. | NiagaraGraph.h | |
UNiagaraNodeOutput * FindEquivalentOutputNode
(
ENiagaraScriptUsage TargetUsageType, |
NiagaraGraph.h | ||
void FindEquivalentOutputNodes
(
ENiagaraScriptUsage TargetUsageType, |
NiagaraGraph.h | ||
void FindInputNodes
(
TArray< class UNiagaraNodeInput* >& OutInputNodes, |
Finds input nodes in the graph with. | NiagaraGraph.h | |
UNiagaraNodeOutput * FindOutputNode
(
ENiagaraScriptUsage TargetUsageType, |
Find the first output node bound to the target usage type. | NiagaraGraph.h | |
void FindOutputNodes
(
TArray< UNiagaraNodeOutput* >& OutputNodes |
Find all output nodes. | NiagaraGraph.h | |
void FindOutputNodes
(
ENiagaraScriptUsage TargetUsageType, |
NiagaraGraph.h | ||
UEdGraphPin * FindParameterMapDefaultValuePin
(
const FName VariableName, |
Walk through the graph for an ParameterMapGet nodes and see if any of them specify a default for VariableName. | NiagaraGraph.h | |
TArray< UEdGraphPin * > FindParameterMapDefaultValuePins
(
const FName VariableName |
Find all matching default pins for VariableName, irrespective of usage. | NiagaraGraph.h | |
TArray< FNiagaraVariable > FindStaticSwitchInputs
(
bool bReachableOnly, |
Returns a list of variable inputs for all static switch nodes in the graph. | NiagaraGraph.h | |
void ForceBaseId
(
ENiagaraScriptUsage InUsage, |
Forces the base compile id for the supplied script. | NiagaraGraph.h | |
void ForceGraphToRecompileOnNextCheck() |
NiagaraGraph.h | ||
void GatherExternalDependencyData
(
ENiagaraScriptUsage InUsage, |
Gather all the change ids of external references for this specific graph traversal. | NiagaraGraph.h | |
void GetAllInputScriptVariables
(
TArray< UNiagaraScriptVariable* >& OutScriptVariables |
Generates a list of all input parameters - including parameters in the Input namespace & Static Switch inputs. | NiagaraGraph.h | |
const FScriptVariableMap & GetAllMetaData () |
NiagaraGraph.h | ||
FScriptVariableMap & GetAllMetaData () |
NiagaraGraph.h | ||
void GetAllReferencedGraphs
(
TArray< const UNiagaraGraph* >& Graphs |
Get all referenced graphs in this specified graph, including this graph. | NiagaraGraph.h | |
| NiagaraGraph.h | |||
void GetAllVariables
(
TArray< FNiagaraVariable >& Variables |
NiagaraGraph.h | ||
FGuid GetBaseId
(
ENiagaraScriptUsage InUsage, |
Gets the current base id associated with the output node traversal specified by InUsage and InUsageId. | NiagaraGraph.h | |
FNiagaraTypeDefinition GetCachedNumericConversion
(
const UEdGraphPin* InPin |
NiagaraGraph.h | ||
FGuid GetChangeID () |
Each graph is given a Change Id that occurs anytime the graph's content is manipulated. | NiagaraGraph.h | |
| NiagaraGraph.h | |||
TArray< UNiagaraScriptVariable * > GetChildScriptVariablesForInput_Deprecated
(
FGuid VariableGuid |
NiagaraGraph.h | ||
FNiagaraCompileHash GetCompileDataHash
(
ENiagaraScriptUsage InUsage, |
Gets the current compile data hash associated with the output node traversal specified by InUsage and InUsageId. | NiagaraGraph.h | |
FNiagaraCompileHash GetCompileReferencedDataHash
(
ENiagaraScriptUsage InUsage, |
Gets the current reference data hash associated with the output node traversal specified by InUsage and InUsageId (Static variables & switches). | NiagaraGraph.h | |
TOptional< ENiagaraDefaultMode > GetDefaultMode
(
const FNiagaraVariable& Variable, |
NiagaraGraph.h | ||
FString GetFunctionAliasByContext
(
const FNiagaraGraphFunctionAliasContext& FunctionAliasContext |
If this graph is the source of a function call, it can add a string to the function name to discern it from different function calls to the same graph. | NiagaraGraph.h | |
TOptional< FNiagaraVariableMetaData > GetMetaData
(
const FNiagaraVariable& InVar |
Gets the meta-data associated with this variable, if it exists. | NiagaraGraph.h | |
const UEdGraphSchema_Niagara * GetNiagaraSchema() |
NiagaraGraph.h | ||
int32 GetOutputNodeVariableIndex
(
const FNiagaraVariable& Attr |
Returns the index of this variable in the output node of the graph. | NiagaraGraph.h | |
void GetOutputNodeVariables
(
TArray< FNiagaraVariable >& OutAttributes |
NiagaraGraph.h | ||
void GetOutputNodeVariables
(
ENiagaraScriptUsage InTargetScriptUsage, |
NiagaraGraph.h | ||
FVersionedNiagaraEmitter GetOwningEmitter() |
NiagaraGraph.h | ||
const TMap< FNiagaraVariable, FNiagaraGraphParameterReferenceCollection > & GetParameterReferenceMap() |
NiagaraGraph.h | ||
void GetParameters
(
TArray< FNiagaraVariable >& Inputs, |
Generates a list of unique input and output parameters for when this script is used as a function. | NiagaraGraph.h | |
| NiagaraGraph.h | |||
UHierarchyRoot * GetScriptParameterHierarchyRoot() |
NiagaraGraph.h | ||
UNiagaraScriptVariable * GetScriptVariable
(
FName ParameterName |
NiagaraGraph.h | ||
UNiagaraScriptVariable * GetScriptVariable
(
FNiagaraVariable Parameter |
NiagaraGraph.h | ||
UNiagaraScriptVariable * GetScriptVariable
(
FGuid VariableGuid |
NiagaraGraph.h | ||
TOptional< FGuid > GetScriptVariableGuid
(
const FNiagaraVariable& Variable |
NiagaraGraph.h | ||
UNiagaraScriptSource * GetSource() |
Get the source that owns this graph | NiagaraGraph.h | |
TOptional< int32 > GetStaticSwitchDefaultValue
(
const FNiagaraVariable& Variable |
NiagaraGraph.h | ||
TOptional< FNiagaraVariable > GetVariable
(
const FNiagaraVariable& Variable |
NiagaraGraph.h | ||
bool HasNumericParameters() |
NiagaraGraph.h | ||
bool HasParameterMapParameters() |
NiagaraGraph.h | ||
bool HasVariable
(
const FNiagaraVariable& Variable |
NiagaraGraph.h | ||
void InvalidateNumericCache() |
NiagaraGraph.h | ||
bool IsCompilationCopy() |
Returns if this graph is for compilation purposes only. | NiagaraGraph.h | |
bool IsEmpty() |
Determine if there are any nodes in this graph. | NiagaraGraph.h | |
bool IsOtherSynchronized
(
const FGuid& InChangeId |
Determine if another item has been synchronized with this graph. | NiagaraGraph.h | |
bool IsPinVisualWidgetProviderRegistered() |
NiagaraGraph.h | ||
TOptional< bool > IsStaticSwitch
(
const FNiagaraVariable& Variable |
NiagaraGraph.h | ||
| Go through all known parameter names in this graph and generate a new unique one. | NiagaraGraph.h | ||
void MarkGraphRequiresSynchronization
(
FString Reason |
Identify that this graph has undergone changes that will require synchronization with a compiled script. | NiagaraGraph.h | |
void MigrateParameterScriptDataToHierarchyRoot
(
FVersionedNiagaraScriptData& OwnerData |
Migrates the deprecated data from the provided OwnerData and populates the ParameterHierarchyRoot | NiagaraGraph.h | |
void MultiFindParameterMapDefaultValuePins
(
TConstArrayView< FName > VariableNames, |
NiagaraGraph.h | ||
void NotifyGraphDataInterfaceChanged() |
Notifies the graph that a contained data interface has changed. | NiagaraGraph.h | |
void NotifyGraphNeedsRecompile() |
Signal to listeners that the graph has changed | NiagaraGraph.h | |
FOnDataInterfaceChanged & OnDataInterfaceChanged() |
Gets a delegate which is called whenever a contained data interfaces changes. | NiagaraGraph.h | |
FOnParametersChanged & OnParametersChanged() |
Gets a delegate which is called whenever a parameter is added or removed | NiagaraGraph.h | |
FOnSubObjectSelectionChanged & OnSubObjectSelectionChanged() |
Gets a delegate which is called whenever a custom subobject in the graph is selected | NiagaraGraph.h | |
void RebuildCachedCompileIds() |
NiagaraGraph.h | ||
bool ReferencesStaticVariable
(
FNiagaraStaticVariableSearchContext& SearchContext |
NiagaraGraph.h | ||
void ReleaseCompilationCopy() |
NiagaraGraph.h | ||
void RemoveOnGraphNeedsRecompileHandler
(
FDelegateHandle Handle |
Remove a listener for OnGraphNeedsRecompile events | NiagaraGraph.h | |
void RemoveParameter
(
const FNiagaraVariable& Parameter, |
Remove parameter from map and all the pins associated. | NiagaraGraph.h | |
void RenameAssignmentAndSetNodePins
(
const FName OldName, |
Rename all assignment and map set node pins. | NiagaraGraph.h | |
bool RenameParameter
(
const FNiagaraVariable& Parameter, |
Rename parameter from map and all the pins associated. | NiagaraGraph.h | |
bool RenameParameterFromPin
(
const FNiagaraVariable& Parameter, |
Rename a pin inline in a graph. | NiagaraGraph.h | |
bool RenameStaticSwitch
(
UNiagaraNodeStaticSwitch* SwitchNode, |
NiagaraGraph.h | ||
void ReplaceScriptReferences
(
UNiagaraScript* OldScript, |
NiagaraGraph.h | ||
void ScriptVariableChanged
(
FNiagaraVariable Variable |
NiagaraGraph.h | ||
void SetIsStaticSwitch
(
const FNiagaraVariable& Variable, |
NiagaraGraph.h | ||
void SetMetaData
(
const FNiagaraVariable& InVar, |
Sets the meta-data associated with this variable. | NiagaraGraph.h | |
bool SynchronizeParameterDefinitionsScriptVariableRemoved
(
const FGuid RemovedScriptVarId |
Find a script variable with the same key as RemovedScriptVarId and unmark it as being sourced from a parameter definitions. | NiagaraGraph.h | |
void SynchronizeParametersWithParameterDefinitions
(
const TArray< UNiagaraParameterDefinitions* > TargetDefinitions, |
Synchronize all source script variables that have been changed or removed from the parameter definitions to all eligible destination script variables owned by the graph. | NiagaraGraph.h | |
bool SynchronizeScriptVariable
(
const UNiagaraScriptVariable* SourceScriptVar, |
Synchronize all the properties of DestScriptVar to those of SourceScriptVar, as well as propagating those changes through the graph (pin variable names and default values on pins.) If DestScriptVar is not set, find a script variable with the same key as the SourceScriptVar. | NiagaraGraph.h |
Overridden from UEdGraph
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void NotifyGraphChanged () |
A change was made to the graph that external parties should take note of. | NiagaraGraph.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
NiagaraGraph.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
NiagaraGraph.h | ||
virtual void PostLoad() |
NiagaraGraph.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AppendCompileHash
(
FNiagaraCompileHashVisitor* InVisitor, |
NiagaraGraph.h | ||
UNiagaraScriptVariable * CreateScriptVariableInternal
(
const FNiagaraVariable& Parameter, |
NiagaraGraph.h | ||
void RebuildNumericCache() |
NiagaraGraph.h | ||
void ResolveNumerics
(
TMap< UNiagaraNode*, bool >& VisitedNodes, |
NiagaraGraph.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void BuildTraversal
(
TArray< class UNiagaraNode* >& OutNodesTraversed, |
NiagaraGraph.h | ||
static void DeclareConstructClasses
(
TArray< FTopLevelAssetPath >& OutConstructClasses, |
NiagaraGraph.h | ||
static FName MakeUniqueParameterNameAcrossGraphs
(
const FName& InName, |
NiagaraGraph.h | ||
static FName StandardizeName
(
FName Name, |
NiagaraGraph.h | ||
static bool VariableLess
(
const FNiagaraVariable& Lhs, |
NiagaraGraph.h |