bEnableInheritableComponents

bEnableInheritableComponents

#Overview

name: bEnableInheritableComponents

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 bEnableInheritableComponents is to control the enabling or disabling of inheritable components in Unreal Engine’s Blueprint system. This setting variable is primarily used within the Blueprint and component inheritance systems.

Based on the callsites, this setting variable is relied upon by the following Unreal Engine subsystems and modules:

  1. Blueprint system
  2. BlueprintGeneratedClass system
  3. Simple Construction Script (SCS) system

The value of this variable is set in the engine configuration file (GEngineIni) under the “Kismet” section with the key “bEnableInheritableComponents”.

This variable interacts with the InheritableComponentHandler, which is responsible for managing inheritable components in Blueprints and Blueprint Generated Classes.

Developers must be aware of the following when using this variable:

  1. When disabled, functions like GetInheritableComponentHandler will return nullptr, effectively disabling the inheritable components feature.
  2. It affects both Blueprints and Blueprint Generated Classes.
  3. It impacts the behavior of the Simple Construction Script (SCS) when dealing with component templates and their data.

Best practices when using this variable include:

  1. Ensure consistency across your project by setting this value in the appropriate configuration file.
  2. Be aware that disabling this feature may impact existing Blueprints that rely on component inheritance.
  3. When working with component inheritance, always check if the feature is enabled before attempting to use related functionality.
  4. Consider the performance implications of enabling or disabling this feature, as it may affect Blueprint compilation and runtime behavior.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:2046, section: [Kismet]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Blueprint.cpp:2082

Scope (from outer to inner):

file
function     UInheritableComponentHandler* UBlueprint::GetInheritableComponentHandler

Source code excerpt:

UInheritableComponentHandler* UBlueprint::GetInheritableComponentHandler(bool bCreateIfNecessary)
{
	static const FBoolConfigValueHelper EnableInheritableComponents(TEXT("Kismet"), TEXT("bEnableInheritableComponents"), GEngineIni);
	if (!EnableInheritableComponents)
	{
		return nullptr;
	}

	if (!InheritableComponentHandler && bCreateIfNecessary)

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/BlueprintGeneratedClass.cpp:1377

Scope (from outer to inner):

file
function     UInheritableComponentHandler* UBlueprintGeneratedClass::GetInheritableComponentHandler

Source code excerpt:

UInheritableComponentHandler* UBlueprintGeneratedClass::GetInheritableComponentHandler(const bool bCreateIfNecessary)
{
	static const FBoolConfigValueHelper EnableInheritableComponents(TEXT("Kismet"), TEXT("bEnableInheritableComponents"), GEngineIni);
	if (!EnableInheritableComponents)
	{
		return nullptr;
	}

	if (!InheritableComponentHandler && bCreateIfNecessary)

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SCS_Node.cpp:29

Scope (from outer to inner):

file
function     UActorComponent* USCS_Node::GetActualComponentTemplate

Source code excerpt:

{
	UActorComponent* OverridenComponentTemplate = nullptr;
	static const FBoolConfigValueHelper EnableInheritableComponents(TEXT("Kismet"), TEXT("bEnableInheritableComponents"), GEngineIni);
	if (EnableInheritableComponents)
	{
		const USimpleConstructionScript* SCS = GetSCS();
		if (SCS != ActualBPGC->SimpleConstructionScript)
		{
			const FComponentKey ComponentKey(this);

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/SCS_Node.cpp:56

Scope (from outer to inner):

file
function     const FBlueprintCookedComponentInstancingData* USCS_Node::GetActualComponentTemplateData

Source code excerpt:

{
	const FBlueprintCookedComponentInstancingData* OverridenComponentTemplateData = nullptr;
	static const FBoolConfigValueHelper EnableInheritableComponents(TEXT("Kismet"), TEXT("bEnableInheritableComponents"), GEngineIni);
	if (EnableInheritableComponents)
	{
		const USimpleConstructionScript* SCS = GetSCS();
		if (SCS != ActualBPGC->SimpleConstructionScript)
		{
			const FComponentKey ComponentKey(this);