# ChildActor is NULL, even though ChildActorClass is set

**URL:** <https://forums.unrealengine.com/t/childactor-is-null-even-though-childactorclass-is-set/312458>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 24, 2015, 11:58pm UTC](https://forums.unrealengine.com/t/childactor-is-null-even-though-childactorclass-is-set/312458 "2015-03-24T23:58:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwiklund](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bwiklund](https://forums.unrealengine.com/u/bwiklund)\
**Post date:** [March 24, 2015, 11:58pm UTC](https://forums.unrealengine.com/t/childactor-is-null-even-though-childactorclass-is-set/312458/1 "2015-03-24T23:58:50Z")

</div>

Here is my setup in my actor’s constructor. The details are unimportant, but the variable names should be informative enough.

```
BackgroundVideoSurface = PCIP.CreateDefaultSubobject<UChildActorComponent>(this, TEXT("BackgroundVideoSurface"));
BackgroundVideoSurface->AttachParent = FirstPersonCameraComponent;
BackgroundVideoSurface->ChildActorClass = (UClass *)VideoSurfaceBlueprint.Object->GeneratedClass;

```

But when I try to access -\>ChildActor later, (In #BeginPlay), it’s always NULL.

```
AVideoDisplaySurface* BackgroundVideoDisplaySurface = (AVideoDisplaySurface*)BackgroundVideoSurface->ChildActor;

```

What am I missing?
