When an actor spawns another actor using AddChildActorComponent that comes alphabetically before it based on blueprint name it will spawn an extra actor that will persist when the scene is stopped during playing.
Certain requirements need to be met to reproduce the issue:
[Link Removed] is an example project.
Found in 4.22.3 CL#7053642
Reproduced in 4.23.0 CL#8386587, 4.24.0 Main CL#9123022
1. Create a blank blueprint project
2. Create a Blueprint Macro Library (child it to Actor).
a. Make two Macros (TestMacro1 & TestMacro2) that have an output of any type.
3. Create two actors (AChild & BParent). Do not child AChild to BParent.
4. Put TestMacro1 in AChild's event graph and TestMacro2 in BParent's event graph. These don't need to connect to anything.
5. In BParent's Constructor call AddChildActorComponent and set the Child Actor Class to AChild.
6. Place BParent in the level
7. Alter the output of TestMacro1 or TestMacro2. Just altering the default output value works.
8. Play the level.
9. Repeat steps 7-8 as needed.
Results: An extra AChild is spawned in the level and persists after Stopping playing.
Expected: No extra AChild is spawned.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-80879 in the post.
1 |
Component | UE - Gameplay |
---|---|
Affects Versions | 4.23, 4.24, 4.22.3 |
Target Fix | 4.24 |
Created | Sep 26, 2019 |
---|---|
Resolved | Sep 30, 2019 |
Updated | Feb 5, 2020 |