UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FEngineShowFlags Struct Reference

#include <ShowFlags.h>

Public Types

enum  EShowFlag { SF_FirstCustom }
 
enum class  ECustomShowFlag : uint32 { First = 0 , None = 0xFFFFFFFF }
 

Public Member Functions

 FEngineShowFlags (EShowFlagInitMode InitMode)
 
 FEngineShowFlags ()
 
void DisableAdvancedFeatures ()
 
void EnableAdvancedFeatures ()
 
void DisableFeaturesForUnlit (bool bAllowAtmosphere=false)
 
bool IsVisualizeCalibrationEnabled () const
 
ENGINE_API void SetSingleFlag (uint32 Index, bool bSet)
 
ENGINE_API bool GetSingleFlag (uint32 Index) const
 
ENGINE_API FString ToString () const
 
ENGINE_API bool SetFromString (const TCHAR *In)
 
void EngineOverrideCustomShowFlagsFromCVars ()
 

Static Public Member Functions

static bool FindShowFlagDisplayName (const FString &InName, FText &OutText)
 
static EShowFlagGroup FindShowFlagGroup (const TCHAR *Name)
 
static bool CanBeToggledInEditor (const TCHAR *Name)
 
static ENGINE_API bool IsForceFlagSet (uint32 Index)
 
static ENGINE_API int32 FindIndexByName (const TCHAR *Name, const TCHAR *CommaSeparatedNames=0)
 
static bool IsNameThere (const TCHAR *Name, const TCHAR *CommaSeparatedNames)
 
static ENGINE_API FString FindNameByIndex (uint32 InIndex)
 
template<class T >
static void IterateAllFlags (T &Sink)
 
static ENGINE_API ECustomShowFlag RegisterCustomShowFlag (const TCHAR *Name, bool DefaultEnabled, EShowFlagGroup Group, FText DisplayName)
 
static ENGINE_API void IterateCustomFlags (TFunctionRef< bool(uint32, const FString &)> Functor)
 

Public Attributes

TBitArray CustomShowFlags
 

Static Public Attributes

static ENGINE_API FSimpleMulticastDelegate OnCustomShowFlagRegistered
 

Detailed Description

ShowFlags are a set of bits (some are fixed in SHIPPING) that are stored in the ViewFamily. They can be used by the artist/designer/developer to debug/profile parts of the rendering. Some ShowFlags are used to customize the rendering e.g. by the SceneCaptureActor, those should not be locked in shipping and not used in inner loops (for performance) They should not be used for scalability (as some might be compiled out for SHIPPING), there we use console variables. ViewModes are on a higher level, they can manipulate show flags before they get used.

Member Enumeration Documentation

◆ ECustomShowFlag

Enumerator
First 
None 

◆ EShowFlag

Enumerator
SF_FirstCustom 

Constructor & Destructor Documentation

◆ FEngineShowFlags() [1/2]

FEngineShowFlags::FEngineShowFlags ( EShowFlagInitMode  InitMode)
inline

this constructor defines the default view settings

◆ FEngineShowFlags() [2/2]

FEngineShowFlags::FEngineShowFlags ( )
inline

DO NOT USE. This constructor is for internal usage only for hot-reload purposes.

Member Function Documentation

◆ CanBeToggledInEditor()

static bool FEngineShowFlags::CanBeToggledInEditor ( const TCHAR Name)
inlinestatic

◆ DisableAdvancedFeatures()

void FEngineShowFlags::DisableAdvancedFeatures ( )
inline

◆ DisableFeaturesForUnlit()

void FEngineShowFlags::DisableFeaturesForUnlit ( bool  bAllowAtmosphere = false)
inline

◆ EnableAdvancedFeatures()

void FEngineShowFlags::EnableAdvancedFeatures ( )
inline

◆ EngineOverrideCustomShowFlagsFromCVars()

void FEngineShowFlags::EngineOverrideCustomShowFlagsFromCVars ( )

◆ FindIndexByName()

int32 FEngineShowFlags::FindIndexByName ( const TCHAR Name,
const TCHAR CommaSeparatedNames = 0 
)
static
Parameters
Namee.g. TEXT("EyeAdaptation")
CommaSeparatedNamesleave 0 for normal purpose, is used internally for the grouping feature
Returns
-1 if not found

◆ FindNameByIndex()

BEGIN_FUNCTION_BUILD_OPTIMIZATION FString FEngineShowFlags::FindNameByIndex ( uint32  InIndex)
static
Parameters
InIndexcan be from FindIndexByName() or IterateAllFlags()
Returns
empty string if not found, otherwise name of the flag e.g. FString(TEXT("PostProcessing"))

◆ FindShowFlagDisplayName()

static bool FEngineShowFlags::FindShowFlagDisplayName ( const FString &  InName,
FText OutText 
)
inlinestatic

Retrieve the localized display name for a named show flag

◆ FindShowFlagGroup()

static EShowFlagGroup FEngineShowFlags::FindShowFlagGroup ( const TCHAR Name)
inlinestatic

this function defines the grouping in the editor. If a flag is not defined here it's assumed to be a postprocess flag

◆ GetSingleFlag()

bool FEngineShowFlags::GetSingleFlag ( uint32  Index) const

O(1)

Parameters
Indexyou can get the index from FindIndexByName() or IterateAllFlags()

◆ IsForceFlagSet()

bool FEngineShowFlags::IsForceFlagSet ( uint32  Index)
static

O(1) Check if a CVar is forcing a particular flag on / off

Parameters
Indexyou can get the index from FindIndexByName() or IterateAllFlags()
Returns
true if CVars are forcing flag on / off, false otherwise

◆ IsNameThere()

static bool FEngineShowFlags::IsNameThere ( const TCHAR Name,
const TCHAR CommaSeparatedNames 
)
inlinestatic
Parameters
Namee.g. TEXT("EyeAdaptation")
CommaSeparatedNamesleave 0 for normal purpose, is used internally for the grouping feature
Returns
success

◆ IsVisualizeCalibrationEnabled()

bool FEngineShowFlags::IsVisualizeCalibrationEnabled ( ) const
inline

◆ IterateAllFlags()

template<class T >
static void FEngineShowFlags::IterateAllFlags ( T &  Sink)
inlinestatic

Allows to iterate through all flags (if you want to change or read the actual flag settings you need to pass in your own instance of FEngineShowFlags). Use this function instead of writing your own parser. implement a class with bool OnEngineShowFlag(uint32 InIndex, const FString& InName) which should return true to parse further

◆ IterateCustomFlags()

void FEngineShowFlags::IterateCustomFlags ( TFunctionRef< bool(uint32, const FString &)>  Functor)
static

◆ RegisterCustomShowFlag()

FEngineShowFlags::ECustomShowFlag FEngineShowFlags::RegisterCustomShowFlag ( const TCHAR Name,
bool  DefaultEnabled,
EShowFlagGroup  Group,
FText  DisplayName 
)
static

◆ SetFromString()

bool FEngineShowFlags::SetFromString ( const TCHAR In)

More powerful than SetSingleFlag() as it allows to set/clear multiple flags not optimized but doesn't have to be Tolerates whitespace and user error, as user might manipulate the data

Parameters
Ine.g. TEXT("PostProcessing,PostProcessingTonemapper=0,AmbientCubemap=1")
Returns
true:success, false:parse error detected

◆ SetSingleFlag()

void FEngineShowFlags::SetSingleFlag ( uint32  Index,
bool  bSet 
)

O(1)

Parameters
bSettrue:set the flag, false:clear the flag

◆ ToString()

FString FEngineShowFlags::ToString ( ) const

not optimized for speed, good for serialization and debugging

Returns
e.g. TEXT("PostProcessingTonemapper=0,AmbientCubemap=1")

Member Data Documentation

◆ CustomShowFlags

TBitArray FEngineShowFlags::CustomShowFlags

◆ OnCustomShowFlagRegistered

FSimpleMulticastDelegate FEngineShowFlags::OnCustomShowFlagRegistered
static

The documentation for this struct was generated from the following files: