Description

A native default subobject can be nulled out during compilation of the owning class in derived Blueprints with circular dependencies. 

Steps to Reproduce

Copied from linked UDN:

The setup:

  • A native actor type, let's call it ANativeBaseActor.
  • Blueprint actor derived from ANativeBaseActor, called BlueprintBaseActor.
  • Another blueprint actor, this time derived from BlueprintBaseActor, I'll call this BlueprintDerivedActor.
  • BlueprintBaseActor needs a circular dependency on BlueprintDerivedActor, I did this by casting "self" to a BlueprintDerivedActor in the event graph of BlueprintBaseActor.
  • BlueprintDerivedActor needs to be a non-dataonly blueprint. I added a variable in blueprint and used it in the event graph.

 

The repro:

  • Add a new component in the C++ class ANativeBaseActor and store it in a UPROPERTY
    • I used a scene component added it as a default subobject in the NativeBaseActor's constructor
  • Load the editor and open BlueprintDerivedActor, observe the added component
  • Open and compile BlueprintDerivedActor
  • Note that the component is nulled out in the BlueprintDerivedActor

Have Comments or More Details?

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

2
Login to Vote

Cannot Reproduce
ComponentUE - Gameplay - Blueprint Compiler
Affects Versions4.26
Target Fix5.0
CreatedMay 7, 2021
ResolvedOct 19, 2021
UpdatedOct 21, 2021
View Jira Issue