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

void

 

SetChildActorClass

(
    TSubclassOf< AActor > InClass
)

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

BeginPlay()

BeginsPlay 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.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback