Description

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:

  1. One of the macros need to be altered before play.
  2. The actor being spawned needs to be alphabetically before the actor spawning it.

[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

Steps to Reproduce

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.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-80879 in the post.

1
Login to Vote

Fixed
ComponentUE - Gameplay
Affects Versions4.234.244.22.3
Target Fix4.24
Fix Commit9309762
Main Commit11254295
Release Commit9552237
CreatedSep 26, 2019
ResolvedSep 30, 2019
UpdatedFeb 5, 2020