ClassesExcludedOnDedicatedClient

ClassesExcludedOnDedicatedClient

#Overview

name: ClassesExcludedOnDedicatedClient

The value of this variable can be defined or overridden in .ini config files. 5 .ini config files referencing this setting variable.

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of ClassesExcludedOnDedicatedClient is to specify a list of class names that should be excluded when cooking content for a dedicated client in Unreal Engine 5. This setting is part of the cooking process, which prepares game content for distribution and deployment.

This setting variable is primarily used by the Cooker subsystem in Unreal Engine 5. It is defined in the UCookerSettings class, which is part of the DeveloperToolSettings module. This module is responsible for various developer-oriented configuration options, including those related to content cooking.

The value of this variable is set through the Unreal Engine Editor’s Project Settings interface. It is defined as a UPROPERTY with the GlobalConfig specifier, which means it can be modified in the project’s configuration files as well.

ClassesExcludedOnDedicatedClient interacts closely with ModulesExcludedOnDedicatedClient. These two variables work together to define what content should be excluded when cooking for a dedicated client. While ClassesExcludedOnDedicatedClient specifies individual class names, ModulesExcludedOnDedicatedClient allows for excluding entire modules.

Developers must be aware that changes to this variable will affect the content included in the cooked game for dedicated clients. Incorrect configuration could lead to missing functionality or unnecessary bloat in the client build.

Best practices when using this variable include:

  1. Carefully consider which classes truly need to be excluded for dedicated clients to avoid potential issues.
  2. Keep the list updated as the project evolves to ensure it remains accurate.
  3. Test the dedicated client build thoroughly after making changes to this setting to ensure no critical functionality is lost.
  4. Use in conjunction with ModulesExcludedOnDedicatedClient for more granular control over excluded content.
  5. Document any classes added to this list to maintain clarity for the development team.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:3129, section: [/Script/UnrealEd.CookerSettings]

Location: <Workspace>/Engine/Config/BaseEngine.ini:3130, section: [/Script/UnrealEd.CookerSettings]

Location: <Workspace>/Engine/Config/BaseEngine.ini:3131, section: [/Script/UnrealEd.CookerSettings]

Location: <Workspace>/Engine/Config/BaseEngine.ini:3132, section: [/Script/UnrealEd.CookerSettings]

Location: <Workspace>/Engine/Config/BaseEngine.ini:3133, section: [/Script/UnrealEd.CookerSettings]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Developer/DeveloperToolSettings/Classes/CookerSettings.h:162

Scope (from outer to inner):

file
class        class UCookerSettings : public UDeveloperSettings

Source code excerpt:

	/** List of class names to exclude when cooking for dedicated client */
	UPROPERTY(GlobalConfig, EditAnywhere, Category = Cooker, AdvancedDisplay, meta = (DisplayName = "Classes excluded when cooking for dedicated client"))
	TArray<FString> ClassesExcludedOnDedicatedClient;

	/** List of module names to exclude when cooking for dedicated client */
	UPROPERTY(GlobalConfig, EditAnywhere, Category = Cooker, AdvancedDisplay, meta = (DisplayName = "Modules excluded when cooking for dedicated client"))
	TArray<FString> ModulesExcludedOnDedicatedClient;

	/** List of r values that need to be versioned */

#Loc: <Workspace>/Engine/Source/Developer/DeveloperToolSettings/Private/CookerSettings.cpp:36

Scope (from outer to inner):

file
function     void UCookerSettings::PostInitProperties

Source code excerpt:

	Super::PostInitProperties();
	UObject::UpdateClassesExcludedFromDedicatedServer(ClassesExcludedOnDedicatedServer, ModulesExcludedOnDedicatedServer);
	UObject::UpdateClassesExcludedFromDedicatedClient(ClassesExcludedOnDedicatedClient, ModulesExcludedOnDedicatedClient);

	// In the 'false' case, we previously deferred to the 'EnabledBlueprintsOnly' method, which is the current default, so we don't need to handle it here.
	if (bCookBlueprintComponentTemplateData)
	{
		BlueprintComponentDataCookingMethod = EBlueprintComponentDataCookingMethod::AllBlueprints;
	}

#Loc: <Workspace>/Engine/Source/Developer/DeveloperToolSettings/Private/CookerSettings.cpp:50

Scope (from outer to inner):

file
function     void UCookerSettings::PostEditChangeProperty

Source code excerpt:

{
	static FName NAME_ClassesExcludedOnDedicatedServer = GET_MEMBER_NAME_CHECKED(UCookerSettings, ClassesExcludedOnDedicatedServer);
	static FName NAME_ClassesExcludedOnDedicatedClient = GET_MEMBER_NAME_CHECKED(UCookerSettings, ClassesExcludedOnDedicatedClient);

	static FName NAME_ModulesExcludedOnDedicatedServer(TEXT("ModulesExcludedOnDedicatedServer"));
	static FName NAME_ModulesExcludedOnDedicatedClient(TEXT("ModulesExcludedOnDedicatedClient"));

	static FName NAME_bCookBlueprintComponentTemplateData = GET_MEMBER_NAME_CHECKED(UCookerSettings, bCookBlueprintComponentTemplateData);
	static FName NAME_BlueprintComponentDataCookingMethod = GET_MEMBER_NAME_CHECKED(UCookerSettings, BlueprintComponentDataCookingMethod);

#Loc: <Workspace>/Engine/Source/Developer/DeveloperToolSettings/Private/CookerSettings.cpp:68

Scope (from outer to inner):

file
function     void UCookerSettings::PostEditChangeProperty

Source code excerpt:

			|| PropertyChangedEvent.Property->GetFName() == NAME_ModulesExcludedOnDedicatedClient)
		{
			UObject::UpdateClassesExcludedFromDedicatedClient(ClassesExcludedOnDedicatedClient, ModulesExcludedOnDedicatedClient);
		}
		else if (bCookBlueprintComponentTemplateData
			&& PropertyChangedEvent.Property->GetFName() == NAME_BlueprintComponentDataCookingMethod)
		{
			UE_LOG(LogCookerSettings, Warning, TEXT("\'%s\' has been deprecated in favor of \'%s\', please remove \'%s\' from %s"),
				*NAME_bCookBlueprintComponentTemplateData.ToString(),