Navigation
API > API/Runtime > API/Runtime/Engine
| Name | USimpleConstructionScript |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/SimpleConstructionScript.h |
| Include Path | #include "Engine/SimpleConstructionScript.h" |
Syntax
UCLASS (MinimalAPI)
class USimpleConstructionScript : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USimpleConstructionScript
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USimpleConstructionScript
(
const FObjectInitializer& ObjectInitializer |
Engine/SimpleConstructionScript.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ComponentTemplateNameSuffix | const FString | Suffix used for component template object name. | Engine/SimpleConstructionScript.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllNodes | TArray< TObjectPtr< class USCS_Node > > | All nodes that exist in the hierarchy of this SimpleConstructionScript | Engine/SimpleConstructionScript.h | |
| bIsConstructingEditorComponents | bool | True if we're constructing editable components in the SCS editor | Engine/SimpleConstructionScript.h | |
| DefaultSceneRootNode | TObjectPtr< class USCS_Node > | Default scene root node; used when no other nodes are available to use as the root | Engine/SimpleConstructionScript.h | |
| EditorActorInstancePtr | TWeakObjectPtr< class AActor > | Actor instance used to host components in the SCS editor | Engine/SimpleConstructionScript.h | |
| FStaticMeshComponentBulkReregisterContext | friend | Engine/SimpleConstructionScript.h | ||
| NameToSCSNodeMap | TMap< FName, USCS_Node * > | Quick lookup from name to SCS Node when executing the script | Engine/SimpleConstructionScript.h | |
| NameToSCSNodeMapRefCount | int32 | Reference count to allow nesting of Create/RemoveNameToSCSNodeMap calls | Engine/SimpleConstructionScript.h | |
| ReregisterContext | FStaticMeshComponentBulkReregisterContext * | Reregister context, which allows bulk handling of render commands | Engine/SimpleConstructionScript.h | |
| RootNodes | TArray< TObjectPtr< class USCS_Node > > | Root nodes of the construction script | Engine/SimpleConstructionScript.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddNode
(
USCS_Node* Node |
Adds this node to the root set | Engine/SimpleConstructionScript.h | |
void BeginEditorComponentConstruction() |
Called by the SCS editor to prepare for constructing editable components | Engine/SimpleConstructionScript.h | |
void ClearEditorComponentReferences() |
Called by the SCS editor to clear all SCS editor component references | Engine/SimpleConstructionScript.h | |
void CreateNameToSCSNodeMap() |
Create the map from names to SCS_Nodes to improve FindSCSNode performance during construction script execution | Engine/SimpleConstructionScript.h | |
| Creates a new SCS node using the given class to create the component template | Engine/SimpleConstructionScript.h | ||
USCS_Node * CreateNodeAndRenameComponent
(
UActorComponent* ExistingTemplate |
Creates a new SCS node using the given component template instance | Engine/SimpleConstructionScript.h | |
void EndEditorComponentConstruction() |
Called by the SCS editor to clean up after constructing editable components | Engine/SimpleConstructionScript.h | |
void ExecuteScriptOnActor
(
AActor* Actor, |
Execute this script on the supplied actor, creating components | Engine/SimpleConstructionScript.h | |
| Find the parent node of this one. Returns NULL if node is not in tree or if is root | Engine/SimpleConstructionScript.h | ||
| Find the SCS_Node node by name and return it if found | Engine/SimpleConstructionScript.h | ||
| Find the SCS_Node node by name and return it if found | Engine/SimpleConstructionScript.h | ||
void FixupRootNodeParentReferences() |
Ensures that all root node parent references are still valid and clears the reference if not | Engine/SimpleConstructionScript.h | |
| Helper function for generating a name for a new node, DesiredName can be used to optionally request a name, ComponentClass is mandatory | Engine/SimpleConstructionScript.h | ||
| Return all nodes in tree as a flat list | Engine/SimpleConstructionScript.h | ||
UBlueprint * GetBlueprint() |
Return the Blueprint associated with this SCS instance | Engine/SimpleConstructionScript.h | |
AActor * GetComponentEditorActorInstance() |
Gets the SCS editor actor instance that's being used for component editing | Engine/SimpleConstructionScript.h | |
| Engine/SimpleConstructionScript.h | |||
const USCS_Node * GetDefaultSceneRootNode () |
Provides read-only access to the default scene root node | Engine/SimpleConstructionScript.h | |
UClass * GetOwnerClass() |
Return the Blueprint associated with this SCS instance | Engine/SimpleConstructionScript.h | |
UClass * GetParentClass() |
Return the parent class of the SCS owner class | Engine/SimpleConstructionScript.h | |
FStaticMeshComponentBulkReregisterContext * GetReregisterContext() |
Engine/SimpleConstructionScript.h | ||
| Provides read-only access to the root node set | Engine/SimpleConstructionScript.h | ||
USceneComponent * GetSceneRootComponentTemplate
(
bool bShouldUseDefaultRoot, |
Helper function to find the current scene root component template and optionally the owning SCS node | Engine/SimpleConstructionScript.h | |
bool IsConstructingEditorComponents() |
Find out whether or not we're constructing components in the SCS editor | Engine/SimpleConstructionScript.h | |
void PreloadChain() |
Engine/SimpleConstructionScript.h | ||
void RemoveNameToSCSNodeMap() |
Remove the map from names to SCS_Nodes | Engine/SimpleConstructionScript.h | |
void RemoveNode
(
USCS_Node* Node, |
Remove this node from the script | Engine/SimpleConstructionScript.h | |
void RemoveNodeAndPromoteChildren
(
USCS_Node* Node |
Remove this node from the script and if it's the root, promote its first child to replace it | Engine/SimpleConstructionScript.h | |
void SaveToTransactionBuffer() |
Saves the current state of SimpleConstructionScript and its nodes to the transaction buffer. | Engine/SimpleConstructionScript.h | |
void SetComponentEditorActorInstance
(
AActor* InActor |
Called by the SCS editor to set the actor instance for component editing | Engine/SimpleConstructionScript.h | |
void ValidateNodeTemplates
(
FCompilerResultsLog& MessageLog |
Ensures that all nodes in the SCS have valid templates | Engine/SimpleConstructionScript.h | |
void ValidateNodeVariableNames
(
FCompilerResultsLog& MessageLog |
Ensures that all nodes in the SCS have valid names for compilation/replication | Engine/SimpleConstructionScript.h | |
void ValidateSceneRootNodes() |
Checks the root node set for scene components and ensures that it is valid (e.g. after a removal) | Engine/SimpleConstructionScript.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual EDataValidationResult IsDataValid
(
FDataValidationContext& Context |
Returns Valid if this object has data validation rules set up for it and the data for this object is valid. | Engine/SimpleConstructionScript.h | |
virtual void PostLoad() |
Engine/SimpleConstructionScript.h | ||
virtual void Serialize
(
FArchive& Ar |
Engine/SimpleConstructionScript.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void RegisterInstancedComponent
(
UActorComponent* Component |
Helper method to register instanced components post-construction | Engine/SimpleConstructionScript.h |