bp.bForcePastedComponentsToSCS

bp.bForcePastedComponentsToSCS

#Overview

name: bp.bForcePastedComponentsToSCS

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bp.bForcePastedComponentsToSCS is to control how components are pasted into blueprints, specifically whether they should be converted to Simple Construction Script (SCS) components.

This setting variable is primarily used in the SubobjectDataSubsystem module, which is part of the Unreal Engine’s editor functionality. It affects the blueprint editing process, particularly when pasting components.

The value of this variable is set through a console variable (CVar) system. It’s initialized to true by default, but can be changed at runtime using console commands or through project settings.

The associated variable bForcePastedComponentsToSCS directly interacts with bp.bForcePastedComponentsToSCS. They share the same value and are used interchangeably in the code.

Developers must be aware that when this variable is set to true, it will change the behavior of pasting components into blueprints. Specifically, it will force instanced components to become SCS components when pasted.

Best practices when using this variable include:

  1. Consider the implications on your workflow before changing its value.
  2. If you’re working on a project where you need consistent behavior for pasted components, ensure this setting is the same across all development machines.
  3. Document any changes to this setting in your project guidelines to ensure all team members are aware of its state.

Regarding the associated variable bForcePastedComponentsToSCS:

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Editor/SubobjectDataInterface/Private/SubobjectDataSubsystem.cpp:43

Scope (from outer to inner):

file
namespace    UE::SubobjectDataSubsystem

Source code excerpt:

	bool bForcePastedComponentsToSCS = true;
	FAutoConsoleVariableRef CVarAudioShapesEnabled(
		TEXT("bp.bForcePastedComponentsToSCS"),
		bForcePastedComponentsToSCS,
		TEXT("Setting this to True will change instanced components pasted into blueprints to be SCS components"),
		ECVF_Default);
}

#Associated Variable and Callsites

This variable is associated with another variable named bForcePastedComponentsToSCS. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Editor/SubobjectDataInterface/Private/SubobjectDataSubsystem.cpp:41

Scope (from outer to inner):

file
namespace    UE::SubobjectDataSubsystem

Source code excerpt:

namespace UE::SubobjectDataSubsystem
{
	bool bForcePastedComponentsToSCS = true;
	FAutoConsoleVariableRef CVarAudioShapesEnabled(
		TEXT("bp.bForcePastedComponentsToSCS"),
		bForcePastedComponentsToSCS,
		TEXT("Setting this to True will change instanced components pasted into blueprints to be SCS components"),
		ECVF_Default);
}


/** Notify the Level Editor that there have been subobject changes to an instance and it needs to be refreshed */

#Loc: <Workspace>/Engine/Source/Editor/SubobjectDataInterface/Private/SubobjectDataSubsystem.cpp:2302

Scope (from outer to inner):

file
function     void USubobjectDataSubsystem::PasteSubobjects

Source code excerpt:

			
			// make sure creation method is set to SimpleConstructionScript
			if (UE::SubobjectDataSubsystem::bForcePastedComponentsToSCS)
			{
				if (NewActorComponent->CreationMethod == EComponentCreationMethod::Instance)
				{
					NewActorComponent->CreationMethod = EComponentCreationMethod::SimpleConstructionScript;
				}
			}