bShowParticleCountsInViewport
bShowParticleCountsInViewport
#Overview
name: bShowParticleCountsInViewport
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bShowParticleCountsInViewport is to control the display of particle counts in the viewport within the Niagara visual effects system in Unreal Engine 5. This setting variable is specifically used for debugging and performance monitoring of particle systems in the Niagara editor.
This setting variable is primarily used by the Niagara plugin, which is part of Unreal Engine’s visual effects system. It’s specifically utilized within the NiagaraEditor module, as evidenced by its presence in the NiagaraEditorSettings class.
The value of this variable is set through the SetShowParticleCountsInViewport function in the UNiagaraEditorSettings class. It’s a boolean value that defaults to false, as seen in the class definition.
This variable interacts with the ViewportSettings struct within the UNiagaraEditorSettings class. When the value is changed, it triggers a SaveConfig() call, which suggests that this setting is persistent across editor sessions.
Developers should be aware that this is a debugging feature, and enabling it may have a performance impact, especially in scenes with many particle systems. It should be used judiciously, primarily during development and optimization phases.
Best practices for using this variable include:
- Enable it only when necessary for debugging or performance analysis.
- Disable it before final builds or when performance is critical.
- Use it in conjunction with other Niagara debugging tools for a comprehensive understanding of particle system performance.
- Remember to check this setting if unexpected particle count displays appear in the viewport.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Plugins/FX/Niagara/Config/BaseNiagara.ini:103, section: [/Script/NiagaraEditor.NiagaraEditorSettings]
- INI Section:
/Script/NiagaraEditor.NiagaraEditorSettings
- Raw value:
False
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Private/NiagaraEditorSettings.cpp:336
Scope (from outer to inner):
file
function bool UNiagaraEditorSettings::IsShowParticleCountsInViewport
Source code excerpt:
bool UNiagaraEditorSettings::IsShowParticleCountsInViewport() const
{
return ViewportSettings.bShowParticleCountsInViewport;
}
void UNiagaraEditorSettings::SetShowParticleCountsInViewport(bool bInShowParticleCountsInViewport)
{
if (this->ViewportSettings.bShowParticleCountsInViewport != bInShowParticleCountsInViewport)
{
this->ViewportSettings.bShowParticleCountsInViewport = bInShowParticleCountsInViewport;
SaveConfig();
}
}
bool UNiagaraEditorSettings::IsShowEmitterExecutionOrder() const
{
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Public/NiagaraEditorSettings.h:320
Scope: file
Source code excerpt:
UPROPERTY(config)
bool bShowParticleCountsInViewport = false;
UPROPERTY(config)
bool bShowEmitterExecutionOrder = false;
UPROPERTY(config)
bool bShowGpuTickInformation = false;
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Public/NiagaraEditorSettings.h:437
Scope (from outer to inner):
file
class class UNiagaraEditorSettings : public UDeveloperSettings
Source code excerpt:
NIAGARAEDITOR_API bool IsShowParticleCountsInViewport() const;
NIAGARAEDITOR_API void SetShowParticleCountsInViewport(bool bShowParticleCountsInViewport);
NIAGARAEDITOR_API FNiagaraNamespaceMetadata GetDefaultNamespaceMetadata() const;
NIAGARAEDITOR_API FNiagaraNamespaceMetadata GetMetaDataForNamespaces(TArray<FName> Namespaces) const;
NIAGARAEDITOR_API FNiagaraNamespaceMetadata GetMetaDataForId(const FGuid& NamespaceId) const;
NIAGARAEDITOR_API const FGuid& GetIdForUsage(ENiagaraScriptUsage Usage) const;
NIAGARAEDITOR_API const TArray<FNiagaraNamespaceMetadata>& GetAllNamespaceMetadata() const;