Direct reference to child actor component will nullify on game start after load from file

Hello,

We have come across a bug with the editor regarding setting direct references to child actor components. A direct reference to a child actor component will nullify after the first run of game mode after loading such a level setup from file.

Steps to reproduce generically:

  1. Create an Actor-based blueprint, Test
  2. Edit it and add a public Actor Reference variable, naming it “ActorReference”
  3. Save, compile and close blueprint Test
  4. Create a second Actor-based blueprint, TestComplex
  5. Edit and add a Child Actor Component
  6. Set the component’s Child Actor Class to the new “Test” blueprint
  7. Select and move the component upward in the blueprint viewport so that it is noticeably different from its root scene component
  8. Save, compile and close blueprint TestComplex
  9. Drag drop an instance of TestComplex into the scene
  10. Drag drop an instance of Test into the scene
  11. With the new Test actor instance selected, set “ActorReference” by using the “Pick Actor from scene” eyedropper button
  12. With the eyedropper, select the child actor component billboard of the TestComplex instance
  13. Notice that “ActorReference” should not be null at this point
  14. Save the level to file
  15. Load the new level file to force a refresh with values loaded from file
  16. Select the Test actor instance
  17. Verify “ActorReference” is not null
  18. Press the Play button for game mode
  19. Stop game mode
  20. Select the Test actor instance to notice “ActorReference” is now null/“None”

I have confirmed this bug in version 4.9 through to 4.11 Preview 5. This bug impacts an asset pack we have on the Marketplace. Please fix this soon.

Thank you in advance.

Hi ossumajor,

I haven’t been able to reproduce this on our end. Could you upload a small test project that showcases the issue?

The following attachment merely contains a TestMap level to load, and the two actor blueprints setup according to the previously mentioned steps.

To notice the issue with this, do the following:

  1. Load TestMap
  2. Select the actor named “Test” which is an instance of Test
  3. Verify that its “ActorReference” field in category “Default” is not null
  4. Press the Play button for game mode
  5. Stop game mode
  6. Select “Test” again and see that “ActorReference” should be null, to confirm the bug

Please note that this project file was created with 4.11 Preview 5. Hope this helps.

TestMap

Thanks for the additional info. I was able to reproduce the issue and I have created JIRA UE-26832. Our developers will be investigating the issue further and we will post here with additional questions if needed.

Cheers,

TJ

TJ that ticket has been closed as won’t fix.
I assume because the problem was due to incorrect usage and there was a workaround/alternative implementation? Could you please elaborate on how to achieve such a thing? (sorry - I know it’s an old bug)