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.
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.
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Fix Commit | 2903185 |
---|---|
Main Commit | 2926677 |
Created | Feb 10, 2016 |
---|---|
Resolved | Mar 23, 2016 |
Updated | Apr 27, 2018 |