# New objects spawned in C++ during play added to the derived blueprints too?

**URL:** <https://forums.unrealengine.com/t/new-objects-spawned-in-c-during-play-added-to-the-derived-blueprints-too/414509>\
**Category:** Blueprint\
**Tags:** child-actor-componen, newobject, unreal-engine, Blueprint, CPP, question\
**Created:** [January 14, 2018, 12:21am UTC](https://forums.unrealengine.com/t/new-objects-spawned-in-c-during-play-added-to-the-derived-blueprints-too/414509 "2018-01-14T00:21:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MC1RScorpion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MC1RScorpion](https://forums.unrealengine.com/u/MC1RScorpion)\
**Post date:** [January 14, 2018, 12:21am UTC](https://forums.unrealengine.com/t/new-objects-spawned-in-c-during-play-added-to-the-derived-blueprints-too/414509/1 "2018-01-14T00:21:27Z")

</div>

Hello,

I’ve used NewObject() to spawn a new component during gameplay but nothing is showing up when the function is executed. The code compiles without complaint.

Are my suspicions that new components spawned in a C++ class during gameplay will not appear on its blueprint children? Am I better off executing a UFunction and handling the last bit of the spawning in blueprint on the child?

Cheers.

---

<div class="post-metadata">

**Author:** ![xlar8or](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xlar8or/32/710746_2.png) [@xlar8or](https://forums.unrealengine.com/u/xlar8or)\
**Post date:** [January 14, 2018, 1:13pm UTC](https://forums.unrealengine.com/t/new-objects-spawned-in-c-during-play-added-to-the-derived-blueprints-too/414509/2 "2018-01-14T13:13:49Z")

</div>

He ythere, did you call the register component after you’ve created it?

---

<div class="post-metadata">

**Author:** ![MC1RScorpion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MC1RScorpion](https://forums.unrealengine.com/u/MC1RScorpion)\
**Post date:** [January 14, 2018, 1:38pm UTC](https://forums.unrealengine.com/t/new-objects-spawned-in-c-during-play-added-to-the-derived-blueprints-too/414509/3 "2018-01-14T13:38:52Z")

</div>

Hi @xlar8or,

I did indeed call RegisterComponent(). I’ve also tried RegisterComponentWithWorld() but to no avail.

---

<div class="post-metadata">

**Author:** ![xlar8or](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xlar8or/32/710746_2.png) [@xlar8or](https://forums.unrealengine.com/u/xlar8or)\
**Post date:** [January 14, 2018, 1:40pm UTC](https://forums.unrealengine.com/t/new-objects-spawned-in-c-during-play-added-to-the-derived-blueprints-too/414509/4 "2018-01-14T13:40:29Z")

</div>

Can you show me your code and what shows/or doesnt show in the blueprint children.

---

<div class="post-metadata">

**Author:** ![MC1RScorpion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MC1RScorpion](https://forums.unrealengine.com/u/MC1RScorpion)\
**Post date:** [January 14, 2018, 1:40pm UTC](https://forums.unrealengine.com/t/new-objects-spawned-in-c-during-play-added-to-the-derived-blueprints-too/414509/5 "2018-01-14T13:40:41Z")

</div>

The plot thickens.

I’ve now tried instead creating a UFunction that then executes an Add _X_ Component node during play but while this also compiles and plays just fine there is no sign of any components being added to the actor.

Am I missing something obvious?

---

<div class="post-metadata">

**Author:** ![MC1RScorpion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MC1RScorpion](https://forums.unrealengine.com/u/MC1RScorpion)\
**Post date:** [January 14, 2018, 1:44pm UTC](https://forums.unrealengine.com/t/new-objects-spawned-in-c-during-play-added-to-the-derived-blueprints-too/414509/6 "2018-01-14T13:44:40Z")

</div>

Hey, thanks a lot.

The relevant code is over in this question [HERE](https://answers.unrealengine.com/questions/744003/how-to-add-blueprint-component-to-apawn-during-pla.html).
