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

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.

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

Hi @xlar8or,

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

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

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?

Hey, thanks a lot.

The relevant code is over in this question HERE.