When an actor contains a nested component (components declared inside another component class), the hierarchy for the actor blueprint does not match the hierarchy of a placed instance of the actor
UPROPERTY() UStaticMeshComponent* Fill; UPROPERTY() UStaticMeshComponent* Stroke;
Fill = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Fill")); Fill->SetupAttachment(this); Stroke = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Stroke")); Stroke->SetupAttachment(this);
UPROPERTY() UAlpha* AlphaA; UPROPERTY() UAlpha* AlphaB;
AlphaA = CreateDefaultSubobject<UAlpha>(TEXT("AlphaA")); AlphaA->SetupAttachment(this); AlphaB = CreateDefaultSubobject<UAlpha>(TEXT("AlphaB")); AlphaB->SetupAttachment(this);
UPROPERTY() UBravo* Bravo;
Bravo = CreateDefaultSubobject<UBravo>(TEXT("Bravo"));
Bravo->SetupAttachment(RootComponent);
Result:
BP hierarchy lists Root->Bravo->AlphaA->Fill/Stroke->AlphaB->Fill/Stroke
Instance hierarchy lists Root->Bravo->AlphaA->Fill/Stroke->Fill/Stroke->AlphaB
Expected:
BP and Instance have matching component hierarchy
Head over to the existing Questions & Answers thread and let us know what's up.
2 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.17.2, 4.18.1 |
Created | Nov 22, 2017 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |