USimpleConstructionScript

Windows
MacOS
Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

USimpleConstructionScript

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/SimpleConstructionScript.h

Include

#include "Engine/SimpleConstructionScript.h"

Syntax

class USimpleConstructionScript : public UObject

Constructors

Name Description

Public function

USimpleConstructionScript

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

AddNode

(
    USCS_Node* Node
)

Adds this node to the root set

Public function

void

 

BeginEditorComponentConstruction()

Called by the SCS editor to prepare for constructing editable components

Public function

void

 

ClearEditorComponentReferences()

Called by the SCS editor to clear all SCS editor component references

Public function

void

 

CreateNameToSCSNodeMap()

Create the map from names to SCS_Nodes to improve FindSCSNode performance during construction script execution

Public function

USCS_Node &#...

 

CreateNode

(
    UClass* NewComponentClass,
    FName NewComponentVariableName
)

Creates a new SCS node using the given class to create the component template

Public function

USCS_Node &#...

 

CreateNodeAndRenameComponent

(
    UActorComponent* ExistingTempl...
)

Creates a new SCS node using the given component template instance

Public function

void

 

EndEditorComponentConstruction()

Called by the SCS editor to clean up after constructing editable components

Public function

void

 

ExecuteScriptOnActor

(
    AActor* Actor,
    const TInlineComponentArray< UScene...,
    const FTransform& RootTransform,
    const FRotationConversionCache*...,
    bool bIsDefaultTransform
)

Execute this script on the supplied actor, creating components

Public function Const

USCS_Node &#...

 

FindParentNode

(
    USCS_Node* InNode
)

Find the parent node of this one. Returns NULL if node is not in tree or if is root

Public function Const

USCS_Node &#...

 

FindSCSNode

(
    const FName InName
)

Find the SCS_Node node by name and return it if found

Public function Const

USCS_Node &#...

 

FindSCSNodeByGuid

(
    const FGuid Guid
)

Find the SCS_Node node by name and return it if found

Public function

void

 

FixupRootNodeParentReferences()

Ensures that all root node parent references are still valid and clears the reference if not

Public function Const

FName

 

GenerateNewComponentName

(
    const UClass* ComponentClass,
    FName DesiredName
)

Helper function for generating a name for a new node, DesiredName can be used to optionally request a name, ComponentClass is mandatory

Public function Const

const TArray...

 

GetAllNodes()

Return all nodes in tree as a flat list

Public function Const

TArray< cons...

 

GetAllNodesConst()

Return immutable references to nodes in tree as a flat list

Public function Const

UBlueprint &...

 

GetBlueprint()

Return the Blueprint associated with this SCS instance

Public function Const

AActor *

 

GetComponentEditorActorInstance()

Gets the SCS editor actor instance that's being used for component editing

Public function

USCS_Node &#...

 

GetDefaultSceneRootNode()

Public function Const

const USCS_N...

 

GetDefaultSceneRootNode()

Provides read-only access to the default scene root node

Public function Const

UClass *

 

GetOwnerClass()

Return the Blueprint associated with this SCS instance

Public function Const

UClass *

 

GetParentClass()

Return the parent class of the SCS owner class

Public function Const

const TArray...

 

GetRootNodes()

Provides read-only access to the root node set

Public function Const

USceneCompon...

 

GetSceneRootComponentTemplate

(
    bool bShouldUseDefaultRoot,
    USCS_Node** OutSCSNode
)

Helper function to find the current scene root component template and optionally the owning SCS node

Public function Const

bool

 

IsConstructingEditorComponents()

Find out whether or not we're constructing components in the SCS editor

Public function

void

 

PreloadChain()

Public function Static

void

 

RegisterInstancedComponent

(
    UActorComponent* Component
)

Helper method to register instanced components post-construction

Public function

void

 

RemoveNameToSCSNodeMap()

Remove the map from names to SCS_Nodes

Public function

void

 

RemoveNode

(
    USCS_Node* Node,
    bool bValidateSceneRootNodes
)

Remove this node from the script

Public function

void

 

RemoveNodeAndPromoteChildren

(
    USCS_Node* Node
)

Remove this node from the script and if it's the root, promote its first child to replace it

Public function

void

 

SetComponentEditorActorInstance

(
    AActor* InActor
)

Called by the SCS editor to set the actor instance for component editing

Public function

void

 

ValidateNodeTemplates

(
    FCompilerResultsLog& MessageLog
)

Ensures that all nodes in the SCS have valid templates

Public function

void

 

ValidateNodeVariableNames

(
    FCompilerResultsLog& MessageLog
)

Ensures that all nodes in the SCS have valid names for compilation/replication

Public function

void

 

ValidateSceneRootNodes()

Checks the root node set for scene components and ensures that it is valid (e.g. after a removal)

Overridden from UObject

Name Description

Public function Virtual

EDataValidat...

 

IsDataValid

(
    TArray< FText >& ValidationErrors
)

Returns Valid if this object has data validation rules set up for it and the data for this object is valid.

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Constants

Name

Description

ComponentTemplateNameSuffix

Suffix used for component template object name.

Deprecated Functions

Name Description

Public function Const

USceneCompon...

 

GetSceneRootComponentTemplate

(
    USCS_Node** OutSCSNode
)

Use version that specifies whether the default scene root should be used

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss