If the ChildActorComponent on a mesh is attached to a component and then has its location set in the OnConstruct function, it'll leave behind non-referenced instances of itself. This is most apparent when moving the components in the Blueprint Editor viewport and hitting the Compile button.

While this seems to be caused by attaching a ChildActor to a component in the constructor and then setting the ChildActor's location to another component's location in the OnConstruct function, which is bad workflow, this shouldn't be leaving behind non-referenced instances.

Steps to Reproduce

1. Download the attached project, unzip it, generate project files, open the .sln, and build the project.
2. Open the .uproject file to open the project
3. Open the 'NewBlueprint' in the Content folder and navigate to the Viewport
4. Hit the compile button and notice that there are two boxes.
5. Move the CollisionBox component and press Compile
Result: whenever Compile is pressed, a new box appears at the CollisionBox's location without removing the previous box
Expected: The existing box should move to the CollisionBox's location or be deleted for a new one to be created.

Have Comments or More Details?

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

Login to Vote

ComponentUE - Gameplay
Affects Versions4.
Target Fix4.12
Fix Commit2903185
Main Commit2926677
CreatedFeb 10, 2016
ResolvedMar 23, 2016
UpdatedApr 27, 2018
View Jira Issue