BaseClassesToAllowRecompilingDuringPlayInEditor

BaseClassesToAllowRecompilingDuringPlayInEditor

#Overview

name: BaseClassesToAllowRecompilingDuringPlayInEditor

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

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of BaseClassesToAllowRecompilingDuringPlayInEditor is to specify which base classes are allowed to be recompiled during Play-In-Editor (PIE) mode in Unreal Engine 5. This setting is used to control the behavior of blueprint compilation during runtime editing.

This setting variable is primarily used by the Blueprint system and the Editor subsystem in Unreal Engine 5. It is referenced in the BlueprintEditor and BlueprintEditorProjectSettings modules.

The value of this variable is set in the project settings or editor preferences. It is defined as a TArray of TSoftClassPtr, which allows for a list of class references to be specified.

This variable interacts with other systems that handle blueprint compilation and Play-In-Editor functionality. It is used in conjunction with a similar variable in the BlueprintEditorProjectSettings class.

Developers must be aware that modifying this variable can impact the performance and stability of the editor during Play-In-Editor sessions. Allowing certain classes to be recompiled during play can lead to unexpected behavior or crashes if not handled carefully.

Best practices when using this variable include:

  1. Only include classes that are safe to recompile during runtime.
  2. Be cautious when adding classes to this list, as it can affect editor stability.
  3. Use this feature sparingly and only for classes that absolutely require runtime recompilation.
  4. Test thoroughly to ensure that recompiling these classes during play doesn’t introduce bugs or performance issues.
  5. Consider the impact on multiplayer games if using this feature, as it may lead to desynchronization.

By carefully managing this setting, developers can balance the flexibility of runtime editing with the stability and performance of their project during Play-In-Editor sessions.

#Setting Variables

#References In INI files

Location: <Workspace>/Projects/Lyra/Config/DefaultEditor.ini:48, section: [/Script/UnrealEd.BlueprintEditorProjectSettings]

Location: <Workspace>/Projects/Lyra/Config/DefaultEditor.ini:49, section: [/Script/UnrealEd.BlueprintEditorProjectSettings]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/BlueprintGraph/Public/BlueprintEditorSettings.h:334

Scope (from outer to inner):

file
class        class UBlueprintEditorSettings : public UDeveloperSettings

Source code excerpt:

	 */
	UPROPERTY(EditAnywhere, config, Category=Play, meta=(AllowAbstract))
	TArray<TSoftClassPtr<UObject>> BaseClassesToAllowRecompilingDuringPlayInEditor;

	/** Get allowed functions permissions list */
	FPathPermissionList& GetFunctionPermissions() { return FunctionPermissions; }

	/** Get allowed structs permissions list */
	FPathPermissionList& GetStructPermissions() { return StructPermissions; }

#Loc: <Workspace>/Engine/Source/Editor/Kismet/Private/BlueprintEditor.cpp:862

Scope: file

Source code excerpt:

						if (UClass* TestClass = Blueprint->GeneratedClass)
						{
							if (CheckClassList(TestClass, GetDefault<UBlueprintEditorSettings>()->BaseClassesToAllowRecompilingDuringPlayInEditor) ||
								CheckClassList(TestClass, GetDefault<UBlueprintEditorProjectSettings>()->BaseClassesToAllowRecompilingDuringPlayInEditor))
							{
								ModifyDuringPIEStatus = ESafeToModifyDuringPIEStatus::Safe;
							}
						}
					}

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Public/Settings/BlueprintEditorProjectSettings.h:76

Scope (from outer to inner):

file
class        class UBlueprintEditorProjectSettings : public UDeveloperSettings

Source code excerpt:

	 */
	UPROPERTY(EditAnywhere, config, Category=Play, meta=(AllowAbstract))
	TArray<TSoftClassPtr<UObject>> BaseClassesToAllowRecompilingDuringPlayInEditor;

	/**
	 * Disallow call-in-editor functions in Editor Utility Blueprint assets from adding buttons to the Details view when an instance of the Blueprint is selected.
	 * 
	 * @todo - Eventually "Blutility" functions are no longer to appear in the Details view by default, in favor of a more flexible solution. At that point, we can
	 * expose this option and allow users to opt the project back into the legacy path until it can be fully deprecated.