UChildActorComponent

A component that spawns an Actor when registered, and destroys it when unregistered.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Components/ChildActorComponent.h

Include

#include "Components/ChildActorComponent.h"

Syntax

class UChildActorComponent : public USceneComponent

Remarks

A component that spawns an Actor when registered, and destroys it when unregistered.

Constructors

Name Description

Public function

UChildActorComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Public function

void

 

ApplyComponentInstanceData

(
    FChildActorComponentInstanceData&#...,
    const ECacheApplyPhase CacheApplyPh...
)

Apply the component instance data to the child actor component

Public function Virtual

void

 

CreateChildActor()

Create the child actor

Public function

void

 

DestroyChildActor()

Kill any currently present child actor

Public function Const

AActor *

 

GetChildActor()

Public function Const

TSubclassOf<...

 

GetChildActorClass()

Public function Const

FName

 

GetChildActorName()

Public function Const

AActor *

 

GetChildActorTemplate()

Public function Const

EChildActorC...

 

GetEditorTreeViewVisualizationMode()

Public function

void

 

SetChildActorClass

(
    TSubclassOf< AActor > InClass
)

Sets the class to use for the child actor.

Public function

void

 

SetChildActorClass

(
    TSubclassOf< AActor > InClass,
    AActor* NewChildActorTemplate
)

Sets then class to use for the child actor providing an optional Actor to use as the template.

Public function

void

 

SetEditorTreeViewVisualizationMode

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

BeginPlay()

Begins Play for the component.

Public function Virtual Const

TStructOnSco...

 

GetComponentInstanceData()

Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation

Public function Virtual

void

 

OnComponentDestroyed

(
    bool bDestroyingHierarchy
)

Called when a component is destroyed

Public function Virtual

void

 

OnRegister()

Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.

Public function Virtual

void

 

OnUnregister()

Called when a component is unregistered.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual Const

void

 

GetLifetimeReplicatedProps

(
    TArray< FLifetimeProperty >& OutLi...
)

Returns properties that are replicated for the lifetime of the actor channel

Public function Virtual

void

 

PostEditChangeChainProperty

(
    FPropertyChangedChainEvent& Proper...
)

This alternate version of PostEditChange is called when properties inside structs are modified.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostEditImport()

Called after importing property values for this object (paste, duplicate or .t3d import) Allow the object to perform any cleanup for properties which shouldn't be duplicated or are unsupported by the script serialization

Public function Virtual

void

 

PostEditUndo()

Called after applying a transaction to the object.

Public function Virtual

void

 

PostLoad()

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

Public function Virtual

void

 

PostRepNotifies()

Called right after calling all OnRep notifies (called even when there are no notifies)

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

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