bCopyStarterContentPreference

bCopyStarterContentPreference

#Overview

name: bCopyStarterContentPreference

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

#Summary

#Usage in the C++ source code

The purpose of bCopyStarterContentPreference is to control whether starter content should be copied when creating a new project in Unreal Engine 5. This setting is part of the project creation and editor settings system.

Based on the provided callsites, this variable is primarily used in the GameProjectGeneration module and the UnrealEd module. Specifically, it’s utilized in the SProjectDialog class, which is responsible for the project creation dialog interface.

The value of this variable is set in two places:

  1. Initially, it’s set to false in the UEditorSettings constructor.
  2. It can be updated when creating a new project, as seen in the CreateProject function of SProjectDialog.

This variable interacts with the UEditorSettings class, which is part of the editor’s configuration system. It’s also used in conjunction with other project creation settings like SelectedHardwareClassTarget and SelectedGraphicsPreset.

Developers should be aware that:

  1. This preference affects whether starter content is copied when creating new projects.
  2. The setting is persistent across editor sessions, as it’s stored in the editor’s configuration.
  3. It can impact the initial size and content of newly created projects.

Best practices when using this variable include:

  1. Consider the target audience of your project when deciding whether to copy starter content by default.
  2. Be mindful of disk space usage, especially for projects that don’t require starter content.
  3. Provide clear documentation or user interface options for team members to understand and modify this setting if needed.
  4. Regularly review and update this preference based on your team’s project creation workflow and needs.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditorSettings.ini:11, section: [/Script/UnrealEd.EditorSettings]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/GameProjectGeneration/Private/SProjectDialog.cpp:786

Scope (from outer to inner):

file
function     TSharedRef<SWidget> SProjectDialog::MakeHybridView

Source code excerpt:

TSharedRef<SWidget> SProjectDialog::MakeHybridView(EProjectDialogModeMode Mode)
{
	bCopyStarterContent = GEditor ? GetDefault<UEditorSettings>()->bCopyStarterContentPreference : true;

	SelectedHardwareClassTarget = EHardwareClass::Desktop;
	SelectedGraphicsPreset = EGraphicsPreset::Maximum;
	bIsStarterContentAvailable = true;

	// Find all template projects

#Loc: <Workspace>/Engine/Source/Editor/GameProjectGeneration/Private/SProjectDialog.cpp:1729

Scope (from outer to inner):

file
function     bool SProjectDialog::CreateProject

Source code excerpt:

	Settings->CreatedProjectPaths.Remove(CreatedProjectPath);
	Settings->CreatedProjectPaths.Insert(CreatedProjectPath, 0);
	Settings->bCopyStarterContentPreference = bCopyStarterContent;
	Settings->PostEditChange();

	return true;
}

void SProjectDialog::CreateAndOpenProject()

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/EditorSettings.cpp:20

Scope (from outer to inner):

file
function     UEditorSettings::UEditorSettings

Source code excerpt:

	: Super(ObjectInitializer)
{
	bCopyStarterContentPreference = false;
	AutoScalabilityWorkScaleAmount = 1;

	// Read the current state of the environment variables and cache it.
	GlobalLocalDDCPath.Path = FPlatformMisc::GetEnvironmentVariable(TEXT("UE-LocalDataCachePath"));
	GlobalSharedDDCPath.Path = FPlatformMisc::GetEnvironmentVariable(TEXT("UE-SharedDataCachePath"));
	GlobalS3DDCPath.Path = FPlatformMisc::GetEnvironmentVariable(TEXT("UE-S3DataCachePath"));

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Public/Settings/EditorSettings.h:134

Scope (from outer to inner):

file
class        class UEditorSettings : public UObject

Source code excerpt:


	UPROPERTY(config)
	bool bCopyStarterContentPreference;

	/** The id's of the surveys completed */
	UPROPERTY(config)
	TArray<FGuid> CompletedSurveys;

	/** The id's of the surveys currently in-progress */