AdditionalParameterEnums
AdditionalParameterEnums
#Overview
name: AdditionalParameterEnums
The value of this variable can be defined or overridden in .ini config files. 3
.ini config files referencing this setting variable.
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of AdditionalParameterEnums is to store a list of additional enum types that can be used as parameters in the Niagara visual effects system within Unreal Engine 5. This setting variable is primarily used for extending the available parameter types in Niagara, allowing developers to include custom enum types in their visual effects workflows.
The Niagara module, which is part of the FX plugin in Unreal Engine 5, relies on this setting variable. Specifically, it is used in the Niagara and NiagaraEditor subsystems.
The value of this variable is set in the Niagara settings (UNiagaraSettings class). It can be modified through the project settings or programmatically using the AddEnumParameterType function.
This variable interacts with other Niagara-related variables and functions, particularly in the type definition and parameter management systems. It works alongside AdditionalParameterTypes and AdditionalPayloadTypes to expand the range of available data types in Niagara.
Developers must be aware that changes to this variable trigger a recreation of the user-defined type registry (FNiagaraTypeDefinition::RecreateUserDefinedTypeRegistry()). This can have performance implications and may affect existing Niagara systems if not managed carefully.
Best practices when using this variable include:
- Only add enum types that are necessary for your project to avoid cluttering the parameter selection interface.
- Ensure that added enum types are properly maintained and don’t become deprecated or removed, which could cause issues in existing Niagara systems.
- Be mindful of the performance impact when modifying this variable, especially in larger projects with many Niagara systems.
- Use the provided AddEnumParameterType function to add new enum types programmatically, as it includes necessary checks and triggers the type registry recreation.
- Consider the implications on existing Niagara systems when adding or removing enum types, and update affected systems accordingly.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Plugins/FX/Niagara/Config/BaseNiagara.ini:51, section: [/Script/Niagara.NiagaraSettings]
- INI Section:
/Script/Niagara.NiagaraSettings
- Raw value:
/Niagara/Enums/ENiagaraCoordinateSpace.ENiagaraCoordinateSpace
- Is Array:
True
Location: <Workspace>/Engine/Plugins/FX/Niagara/Config/BaseNiagara.ini:52, section: [/Script/Niagara.NiagaraSettings]
- INI Section:
/Script/Niagara.NiagaraSettings
- Raw value:
/Niagara/Enums/ENiagaraOrientationAxis.ENiagaraOrientationAxis
- Is Array:
True
Location: <Workspace>/Engine/Plugins/FX/Niagara/Config/BaseNiagara.ini:53, section: [/Script/Niagara.NiagaraSettings]
- INI Section:
/Script/Niagara.NiagaraSettings
- Raw value:
/Niagara/Enums/ENiagaraRandomnessMode.ENiagaraRandomnessMode
- Is Array:
True
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/Niagara/Private/NiagaraModule.cpp:1311
Scope (from outer to inner):
file
function void FNiagaraTypeDefinition::RecreateUserDefinedTypeRegistry
Source code excerpt:
}
for (FSoftObjectPath AssetRef : Settings->AdditionalParameterEnums)
{
FSoftObjectPath AssetRefPathNamePreResolve = AssetRef;
UObject* Obj = AssetRef.ResolveObject();
if (DenyList.Contains(AssetRefPathNamePreResolve))
{
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/Niagara/Private/NiagaraSettings.cpp:27
Scope (from outer to inner):
file
function void UNiagaraSettings::AddEnumParameterType
Source code excerpt:
void UNiagaraSettings::AddEnumParameterType(UEnum* Enum)
{
if(!AdditionalParameterEnums.Contains(Enum))
{
AdditionalParameterEnums.Add(Enum);
FNiagaraTypeDefinition::RecreateUserDefinedTypeRegistry();
}
}
FText UNiagaraSettings::GetSectionText() const
{
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/Niagara/Public/NiagaraSettings.h:130
Scope (from outer to inner):
file
class class UNiagaraSettings : public UDeveloperSettings
Source code excerpt:
UPROPERTY(config, EditAnywhere, Category = Niagara, meta = (AllowedClasses = "/Script/CoreUObject.Enum"))
TArray<FSoftObjectPath> AdditionalParameterEnums;
/** Sets the default navigation behavior for the system preview viewport. */
UPROPERTY(config, EditAnywhere, Category = Viewport)
bool bSystemViewportInOrbitMode = true;
/** If true then the "link input" menu will also show variables of different types, as long as there is a conversion script for them. */
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Private/NiagaraEditorModule.cpp:1774
Scope (from outer to inner):
file
function void FNiagaraEditorModule::OnNiagaraSettingsChangedEvent
Source code excerpt:
if (PropertyName == GET_MEMBER_NAME_CHECKED(UNiagaraSettings, AdditionalParameterTypes)
|| PropertyName == GET_MEMBER_NAME_CHECKED(UNiagaraSettings, AdditionalPayloadTypes)
|| PropertyName == GET_MEMBER_NAME_CHECKED(UNiagaraSettings, AdditionalParameterEnums))
{
FNiagaraTypeDefinition::RecreateUserDefinedTypeRegistry();
}
}
void FNiagaraEditorModule::RegisterTypeUtilities(FNiagaraTypeDefinition Type, TSharedRef<INiagaraEditorTypeUtilities, ESPMode::ThreadSafe> EditorUtilities)
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Private/NiagaraNodeStaticSwitch.cpp:1220
Scope (from outer to inner):
file
function void UNiagaraNodeStaticSwitch::GetNodeContextMenuActions
lambda-function
Source code excerpt:
}), FCanExecuteAction::CreateLambda([this]()
{
return !GetDefault<UNiagaraSettings>()->AdditionalParameterEnums.Contains(SwitchTypeData.Enum);
})));
}
}
FText UNiagaraNodeStaticSwitch::GetTooltipText() const
{