Description

Having Child Actor Components that are set in code can cause data loss upon compiling the blueprint.

In this particular scenario, there are two custom Actor classes involved, MainActor and SubActor. SubActor contains a UStaticMeshComponent pointer that is populated with a default subobject in the Constructor. MainActor contains a USceneComponent as its Root Component as well as three UChildActorComponents, each with their ChildActorClass set to SubActor and attached to the Root Component.

The Static Mesh Component for two of the ChildActorComponents is cleared whenever Compile is hit in the blueprint editor when inside of a blueprint based off of MainActor. There are also weird combinations of this removing things at random which can be seen by clicking the Reset to Default button on these Static Mesh Components and then hitting compile.

This is an odd issue, to me at least. If you have any questions about the setup or need any particular scenarios tested, please let me know.

Regression?: No
While this didn't occur in 4.13, it was not able to as the affected properties were not visible from the Blueprint editor.

Steps to Reproduce
  1. Download the attached project, compile it, and open it
  2. Open MainActorBP
  3. Notice that the three Child Actor Components (MyChildActor, MySecondChildActor, and MyThirdChildActor) each have a Static Mesh Component in their My Mesh property
  4. Press Compile in the Blueprint Editor
    Result: The Static Mesh Component in the My Mesh property for MyChildActor and MySecondChildActor disappear and it resets to none, while MyThirdChildActor remains the same.
    Expected: None of these should disappear. As shown by clicking the Reset to Default button beside the entries, the default is that the Static Mesh Component should be there.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

3
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.14.14.15
Target Fix4.15
Fix Commit3252936
Main Commit3389599
Release Commit3253281
CreatedDec 22, 2016
ResolvedJan 10, 2017
UpdatedApr 27, 2018
View Jira Issue