Description

From reporting UDN:

"We had a weird issue with new components added in C++ not being instanced properly on non-direct Blueprint children.

It seems to happen if loading of the parent BP is deferred. It might be related to the code inside USE_CIRCULAR_DEPENDENCY_LOAD_DEFERRING not instancing components in case of deferred loading."

Steps to Reproduce

1.) Create a new (blank) C++ project

2.) Save the level and setup as startup level

3.) Add a new C++ class to the project based on ACharacter, (AMyCharacter)

4.) Add an ActorComponent (e.g. a capsule) to the character in C++ just for reference (this one will behave correctly)

5.) Start the engine, create a blueprint based on MyCharacter (BP_MyCharacterBase)

6.) Create a BP based on BP_MyCharacterBase (BP_MyCharacterChild)

7.) Open BP_MyCharacterBase, add a variable of type BP_MyCharacterChild to the BP (so the parent references the child)

8.) Place an instance of BP_MyCharacterBase on the (startup) level

9.) Save everything, close the editor 

10.) Add a new capsule component to AMyCharacter in C++ 

11.) Start the engine 

Observe the following:

  • Check BP_MyCharacterChild with property editor. The newly added component will be in the transient package

 

CapsuleComponent'/Game/BP_MyCharacterChild.Default__BP_MyCharacterChild_C:ComponentTest_Good'

CapsuleComponent'/Engine/Transient.Default__BP_MyCharacterBase_C:ComonentTest_Bad'

 

  • If you open BP_MyCharacterChild and hit Compile, the component will become nullptr (and it will have an empty details panel)

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint Compiler
Affects Versions5.0
Target Fix5.0
Fix Commit17961263
Main Commit17935686
CreatedOct 25, 2021
ResolvedOct 28, 2021
UpdatedNov 10, 2021
View Jira Issue