fx.Niagara.ParticleRead.IgnoreUnsafeReads

fx.Niagara.ParticleRead.IgnoreUnsafeReads

#Overview

name: fx.Niagara.ParticleRead.IgnoreUnsafeReads

This variable is created as a Console Variable (cvar).

It is referenced in 2 C++ source files.

#Summary

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/Niagara/Private/NiagaraDataInterfaceParticleRead.cpp:105

Scope: file

Source code excerpt:

static bool GNiagaraParticleReadIgnoreUnsafeReads = false;
static FAutoConsoleVariableRef CVarNiagaraParticleReadIgnoreUnsafeReads(
	TEXT("fx.Niagara.ParticleRead.IgnoreUnsafeReads"),
	GNiagaraParticleReadIgnoreUnsafeReads,
	TEXT("When enabled we will allow unsafe reads to compile with a warning, however the read result will be invalid."),
	ECVF_Default
);

DECLARE_INTRINSIC_TYPE_LAYOUT(ENiagaraParticleDataValueType);

#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Private/NiagaraHlslTranslator.cpp:1396

Scope: file

Source code excerpt:

							if(DataInterfaceData.ReadsEmitterParticleData.Contains(CompileData->EmitterUniqueName))
							{
								IConsoleVariable* CVarIgnoreUnsafeReads = IConsoleManager::Get().FindConsoleVariable(TEXT("fx.Niagara.ParticleRead.IgnoreUnsafeReads"));
								const bool bIgnoredUnsafeReads = CVarIgnoreUnsafeReads ? CVarIgnoreUnsafeReads->GetBool() : false;
								if (bIgnoredUnsafeReads && CompileSimStageData.bParticleIterationStateEnabled)
								{
									Warning(LOCTEXT("ReadsSelfEmitterDataIterationStage", "Reading own emitter data using iteration state can cause a race."), nullptr, nullptr);
								}
								else