ShowLightingBuildInfo

ShowLightingBuildInfo

#Overview

name: ShowLightingBuildInfo

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 5 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of ShowLightingBuildInfo is to control whether lighting build information should be displayed during the lighting build process in Unreal Engine 5.

This setting variable is primarily used by the lighting and editor subsystems of Unreal Engine 5. It is referenced in modules related to the Level Editor, UnrealEd, and EditorTests.

The value of this variable is typically set in the project’s configuration file (GEditorPerProjectIni). It can be toggled through the Level Editor’s lighting build options menu, as evidenced by the LightingBuildOptions_ShowLightingStats_Toggled function in LevelEditorActions.cpp.

This variable interacts with other lighting build options such as OnlyBuildVisibility, UseErrorColoring, and QualityLevel. These variables are often read together to configure the lighting build process.

Developers should be aware that enabling this option will display additional information during the lighting build process, which can be helpful for debugging but may also impact performance slightly.

Best practices when using this variable include:

  1. Enable it during development and debugging phases to gain insights into the lighting build process.
  2. Consider disabling it for final builds or when performance is a priority.
  3. Use it in conjunction with other lighting build options to fine-tune the build process for your specific project needs.
  4. Be mindful of its impact on the user interface, as it may display additional windows or information that could clutter the editor view.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:509, section: [LightingBuildOptions]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Tests/EditorTests/Source/EditorTests/Private/UnrealEd/EditorBuildPromotionTests.cpp:360

Scope (from outer to inner):

file
namespace    EditorBuildPromotionTestUtils
function     static void BuildLighting

Source code excerpt:

		GConfig->GetBool(TEXT("LightingBuildOptions"), TEXT("OnlyBuildVisibility"), LightingBuildOptions.bOnlyBuildVisibility, GEditorPerProjectIni);
		GConfig->GetBool(TEXT("LightingBuildOptions"), TEXT("UseErrorColoring"), LightingBuildOptions.bUseErrorColoring, GEditorPerProjectIni);
		GConfig->GetBool(TEXT("LightingBuildOptions"), TEXT("ShowLightingBuildInfo"), LightingBuildOptions.bShowLightingBuildInfo, GEditorPerProjectIni);
		int32 QualityLevel;
		GConfig->GetInt(TEXT("LightingBuildOptions"), TEXT("QualityLevel"), QualityLevel, GEditorPerProjectIni);
		QualityLevel = FMath::Clamp<int32>(QualityLevel, Quality_Preview, Quality_Production);
		LightingBuildOptions.QualityLevel = (ELightingBuildQuality)QualityLevel;

		GUnrealEd->BuildLighting(LightingBuildOptions);

#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/LevelEditorActions.cpp:841

Scope (from outer to inner):

file
function     bool FLevelEditorActionCallbacks::LightingBuildOptions_ShowLightingStats_IsChecked

Source code excerpt:

{
	bool bShowLightingBuildInfo = false;
	GConfig->GetBool(TEXT("LightingBuildOptions"), TEXT("ShowLightingBuildInfo"), bShowLightingBuildInfo, GEditorPerProjectIni);
	return bShowLightingBuildInfo;
}


void FLevelEditorActionCallbacks::LightingBuildOptions_ShowLightingStats_Toggled()
{
	bool bShowLightingBuildInfo = false;
	GConfig->GetBool( TEXT("LightingBuildOptions"), TEXT("ShowLightingBuildInfo"), bShowLightingBuildInfo, GEditorPerProjectIni );
	GConfig->SetBool( TEXT("LightingBuildOptions"), TEXT("ShowLightingBuildInfo"), !bShowLightingBuildInfo, GEditorPerProjectIni );
}



void FLevelEditorActionCallbacks::BuildGeometryOnly_Execute()
{

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorBuildUtils.cpp:306

Scope (from outer to inner):

file
function     bool FEditorBuildUtils::EditorBuild

Source code excerpt:

		GConfig->GetBool( TEXT("LightingBuildOptions"), TEXT("OnlyBuildVisibility"),	LightingBuildOptions.bOnlyBuildVisibility,		GEditorPerProjectIni );
		GConfig->GetBool( TEXT("LightingBuildOptions"), TEXT("UseErrorColoring"),		LightingBuildOptions.bUseErrorColoring,			GEditorPerProjectIni );
		GConfig->GetBool( TEXT("LightingBuildOptions"), TEXT("ShowLightingBuildInfo"),	LightingBuildOptions.bShowLightingBuildInfo,		GEditorPerProjectIni );
		int32 QualityLevel;
		GConfig->GetInt(  TEXT("LightingBuildOptions"), TEXT("QualityLevel"),			QualityLevel,						GEditorPerProjectIni );
		QualityLevel = FMath::Clamp<int32>(QualityLevel, Quality_Preview, Quality_Production);
		LightingBuildOptions.QualityLevel = (ELightingBuildQuality)QualityLevel;
	}

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/StaticLightingSystem/StaticLightingSystem.cpp:2302

Scope (from outer to inner):

file
function     bool FStaticLightingSystem::FinishLightmassProcess

Source code excerpt:

		
			bool bShowLightingBuildInfo = false;
			GConfig->GetBool( TEXT("LightingBuildOptions"), TEXT("ShowLightingBuildInfo"), bShowLightingBuildInfo, GEditorPerProjectIni );
			if( bShowLightingBuildInfo )
			{
				StatsViewerModule.GetPage(EStatsPage::LightingBuildInfo)->Show();
			}
		}

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Tests/AutomationEditorCommon.cpp:1002

Scope (from outer to inner):

file
function     bool FBuildLightingCommand::Update

Source code excerpt:

	GConfig->GetBool(TEXT("LightingBuildOptions"), TEXT("OnlyBuildVisibility"), LightingBuildOptions.bOnlyBuildVisibility, GEditorPerProjectIni);
	GConfig->GetBool(TEXT("LightingBuildOptions"), TEXT("UseErrorColoring"), LightingBuildOptions.bUseErrorColoring, GEditorPerProjectIni);
	GConfig->GetBool(TEXT("LightingBuildOptions"), TEXT("ShowLightingBuildInfo"), LightingBuildOptions.bShowLightingBuildInfo, GEditorPerProjectIni);
	int32 QualityLevel;
	GConfig->GetInt(TEXT("LightingBuildOptions"), TEXT("QualityLevel"), QualityLevel, GEditorPerProjectIni);
	QualityLevel = FMath::Clamp<int32>(QualityLevel, Quality_Preview, Quality_Production);
	LightingBuildOptions.QualityLevel = Quality_Production;

	UE_LOG(LogEditorAutomationTests, Log, TEXT("Building lighting in Production Quality."));