FSubobjectData

A struct that represents a single subobject.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

SubobjectDataInterface

Header

/Engine/Source/Editor/SubobjectDataInterface/Public/SubobjectData.h

Include

#include "SubobjectData.h"

Syntax

struct FSubobjectData

Remarks

A struct that represents a single subobject. This can be anything, but are most commonly components attached to an actor instance or blueprint. Keeps track of the handles to its parent object and any child that it has.

If you wish to modify a subobject, use the SubobjectDataSubsystem.

Variables

Name Description

Protected variable

TArray< FSubobj...

 

ChildrenHandles

Set of child subobjects that use this subobject as a parent.

Protected variable

FSubobjectDataH...

 

Handle

Handle that will have a globally unique ID when it is constructed (i.e. when this is constructed)

Protected variable

FSubobjectDataH...

 

ParentObjectHandle

Handle to this object's parent. If this is invalid, then it is the root subobject.

Protected variable

TWeakObjectPtr<...

 

SCSNodePtr

For now, we need a pointer to the SCS node in order to have the correct component template and to be able to get the UBlueprint* from components.

Protected variable

TWeakObjectPtr<...

 

WeakObjectPtr

Weak ptr to the object instance represented by this node (e.g. component template)

Constructors

Name Description

Public function

FSubobjectData()

Public function

FSubobjectData

(
    UObject* ContextObject,
    const FSubobjectDataHandle& Parent...
)

Destructors

Name Description

Public function Virtual

~FSubobjectData()

Functions

Name Description

Protected function

bool

 

AddChildHandleOnly

(
    const FSubobjectDataHandle& InHand...
)

Add the given subobject handle as a child of this.

Protected function

bool

 

AttemptToSetSCSNode()

Attempts to set the SCS node member variable based on the WeakObjectPtr.

Public function Virtual Const

bool

 

CanCopy()

Public function Virtual Const

bool

 

CanDelete()

Public function Virtual Const

bool

 

CanDuplicate()

Public function Virtual Const

bool

 

CanEdit()

Public function Virtual Const

bool

 

CanRename()

Public function Virtual Const

bool

 

CanReparent()

Protected function

void

 

ClearParentHandle()

Public function Const

FSubobjectDa...

 

FindChild

(
    const FSubobjectDataHandle& ChildH...
)

Attempt to find the given handle in out child array and return a pointer to it.

Public function Const

FSubobjectDa...

 

FindChildByObject

(
    UObject* ContextObject
)

Attempt to find the given handle in out child array and return a pointer to it.

Public function Const

const UActor...

 

FindComponentInstanceInActor

(
    const AActor* InActor
)

Protected function Const

UActorCompon...

 

FindMutableComponentInstanceInActor

(
    const AActor* InActor
)

Protected function Static

USCS_Node &#...

 

FindSCSNodeForInstance

(
    const UActorComponent* Instanc...,
    UClass* ClassToSearch
)

Anything related to an SCS node will be changed with an upcoming refactor and should remain private.

Public function Virtual Const

FText

 

GetActorDisplayText()

Public function Const

FText

 

GetAssetName()

Get the asset name of this subobject from the asset brokerage

Public function Const

FText

 

GetAssetPath()

Get the asset path of this subobject from the asset brokerage

Public function Const

UBlueprint &...

 

GetBlueprint()

Public function Const

const TArray...

 

GetChildrenHandles()

Public function Const

FText

 

GetComponentEditorOnlyTooltipText()

Retrieves a tooltip text describing if the component is marked Editor only or not

Public function Const

const UActor...

 

GetComponentTemplate

(
    bool bEvenIfPendingKill
)

@note Deliberately non-virtual, for performance reasons.

Public function Virtual Const

FText

 

GetDisplayName()

Public function Virtual Const

FText

 

GetDisplayNameContextModifiers

(
    bool bShowNativeComponentNames
)

Returns a string that gives details about this subobject.

Public function Virtual Const

FString

 

GetDisplayString

(
    bool bShowNativeComponentNames
)

Public function Const

FText

 

GetDragDropDisplayText()

Get the display name of this subobject that should be used during drag/drop operations

Public function Const

FSubobjectDa...

 

GetHandle()

Public function Const

FText

 

GetIntroducedInToolTipText()

Retrieves tooltip text describing where the component was first introduced (for inherited components).

Public function Const

FText

 

GetMobilityToolTipText()

Retrieves tooltip text describing the specified component's mobility.

Protected function

AActor *

 

GetMutableActorContext()

If this subobject is an actor, then return a pointer to that.

Protected function Const

UActorCompon...

 

GetMutableComponentTemplate

(
    bool bEvenIfPendingKill
)

Protected function Const

T *

 

GetMutableObject

(
    bool bEvenIfPendingKill
)

Protected function Const

UObject *...

 

GetMutableObject

(
    bool bEvenIfPendingKill
)

Muteable accessors for this subobject to be used by the subsystem.

Protected function Const

T *

 

GetMutableObjectForBlueprint

(
    UBlueprint* Blueprint
)

Public function Const

const T *...

 

GetObject

(
    bool bEvenIfPendingKill
)

@note Deliberately non-virtual, for performance reasons.

Public function Const

const UObjec...

 

GetObject

(
    bool bEvenIfPendingKill
)

Public function Const

const T *...

 

GetObjectForBlueprint

(
    UBlueprint* Blueprint
)

Public function Const

const UObjec...

 

GetObjectForBlueprint

(
    UBlueprint* Blueprint
)

@note May not be the same as the value returned by GetObject().

Public function Const

FSubobjectDa...

 

GetParentData()

Public function Const

FSubobjectDa...

 

GetParentHandle()

Public function Const

FSubobjectDa...

 

GetRootSubobject()

Walks the parent heirarchy and returns the root subobject in this case

Protected function Virtual Const

USCS_Node &#...

 

GetSCSNode

(
    bool bEvenIfPendingKill
)

Public function Const

FName

 

GetSocketFName()

Public function Const

FText

 

GetSocketName()

Sockets for attaching in the viewport.

Public function Virtual Const

FName

 

GetVariableName()

Public function Const

bool

 

HasChild

(
    const FSubobjectDataHandle& ChildH...
)

Return true if the given handle is a child of this subobject.

Public function Const

bool

 

HasParent()

Public function Const

bool

 

HasValidSocket()

Public function Virtual Const

bool

 

IsActor()

Public function Const

bool

 

IsAssetVisible()

Returns true if the asset this object represents is visible

Public function Const

bool

 

IsAttachedTo

(
    const FSubobjectDataHandle& InHand...
)

Public function Virtual Const

bool

 

IsBlueprintInheritedComponent()

Public function Virtual Const

bool

 

IsChildActor()

Public function Virtual Const

bool

 

IsChildActorSubtreeObject()

Returns true if this subobject is a part of a child actor's hierarchy and not the root actor.

Public function Virtual Const

bool

 

IsComponent()

Returns true if this subobject is a component.

Public function Virtual Const

bool

 

IsDefaultSceneRoot()

Public function Virtual Const

bool

 

IsInheritedComponent()

Protected function Virtual Const

bool

 

IsInheritedSCSNode()

True if this SCS node's blueprint is a child of another Blueprint-generated class, which means that we must use the InheritableComponentHandler

Public function Virtual Const

bool

 

IsInstancedActor()

Public function Virtual Const

bool

 

IsInstancedComponent()

Public function Virtual Const

bool

 

IsInstancedInheritedComponent()

True if this subobject is an instance of an inherited component (its owner is an instanced actor)

Public function Virtual Const

bool

 

IsNativeComponent()

Public function Virtual Const

bool

 

IsRootActor()

Public function Virtual Const

bool

 

IsRootComponent()

Public function Virtual Const

bool

 

IsSceneComponent()

Public function Const

bool

 

IsValid()

True if this subobject's handle is valid

Protected function

bool

 

RemoveChildHandleOnly

(
    const FSubobjectDataHandle& InHand...
)

Add the given subobject handle as a child of this.

Public function Const

bool

 

SceneRootHasDefaultName()

Returns true if the component template's FName starts with USceneComponent::GetDefaultSceneRootVariableName

Protected function

void

 

SetParentHandle

(
    const FSubobjectDataHandle& NewPar...
)

Public function

void

 

SetSocketName

(
    FName InNewName
)

Public function

void

 

SetupAttachment

(
    FName SocketName,
    const FSubobjectDataHandle& Attach...
)