Child Actor Component - Changing class during play destroys child actor

Changing the class of a ChildActorComponent (during PIE) destroys the child actor. When the class is set to the same as the default class it is spawned again, but when it is set to another class the child actor does not re-appear.

Steps to reproduce:

  1. Create 3 new blueprint classes (A, B, C).
  2. In the first blueprint class (A) add a ChildActorComponent.
  3. Set the ChildActorComponent class to B.
  4. Create a Blueprint script that switches the ChildActorComponent class between B and C (see example).
  5. Start PIE, and switch the class.

Expected Result:

When you switch class. The Child Actor is destroyed, and a new Child Actor of the new class is spawned.

Actual Result:

When you switch class. The Child Actor is destroyed, and if the new Child Actor class is not the same as the default class NO new Child Actor is spawned. If the class is the same as the default class it works as expected.

Reproduction Rate:

Every time, on multiple machines.

Tested in 4.15.0, and 4.15.1.

Hello ,

I was able to reproduce this issue on our end. I have written up a report and I have submitted to the developers for further consideration. I have also provided a link to the public tracker. Please feel free to use the link for future updates. Thank you for your time and information.

Link: Unreal Engine Issues and Bug Tracker (UE-43356)

Make it a great day

It happens far too often that a bug will be reported, reproduced and linked, but few give workarounds for cases in which one cannot switch to a newer version of the engine or wait for the bug to be fixed.
For people that fall under any of these two cases, here is a workaround function you can define in your blueprint function library: