I’m getting really frustrated by this thing and I can’t seem to find a solution:
Scene components are randomly placed in the actor hierarchy, they don’t seem to follow any rule…
If I duplicate one of these, the new ones are added in the middle or in some random position:
They are declared and attached in the desired order, I also tried to add the metatags “DisplayPriority” and “DisplayAfter” but nothing changes
.h File
AAntheaCharacter_Arkan_M();
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
class USkeletalMeshComponent *AntennaeComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *BladeComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *ChestAdditionComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *ChestComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *GauntletComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *GemComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *GloveComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *HornComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *KabutoComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *NeckComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *NecklaceComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *ShoulderAdditionComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *ShoulderComponent;
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Character Components")
USkeletalMeshComponent *TrouserComponent;
.cpp File
AAntheaCharacter_Arkan_M::AAntheaCharacter_Arkan_M()
{
auto BodyMesh = ACharacter::GetMesh();
AntennaeComponent = CreateDefaultSubobject<USkeletalMeshComponent>("AntennaeComponent");
AntennaeComponent->SetupAttachment(BodyMesh);
BladeComponent = CreateDefaultSubobject<USkeletalMeshComponent>("BladeComponent");
BladeComponent->SetupAttachment(BodyMesh);
ChestAdditionComponent = CreateDefaultSubobject<USkeletalMeshComponent>("ChestAdditionComponent");
ChestAdditionComponent->SetupAttachment(BodyMesh);
ChestComponent = CreateDefaultSubobject<USkeletalMeshComponent>("ChestComponent");
ChestComponent->SetupAttachment(BodyMesh);
GauntletComponent = CreateDefaultSubobject<USkeletalMeshComponent>("GauntletComponent");
GauntletComponent->SetupAttachment(BodyMesh);
GemComponent = CreateDefaultSubobject<USkeletalMeshComponent>("GemComponent");
GemComponent->SetupAttachment(BodyMesh);
GloveComponent = CreateDefaultSubobject<USkeletalMeshComponent>("GloveComponent");
GloveComponent->SetupAttachment(BodyMesh);
HornComponent = CreateDefaultSubobject<USkeletalMeshComponent>("HornComponent");
HornComponent->SetupAttachment(BodyMesh);
KabutoComponent = CreateDefaultSubobject<USkeletalMeshComponent>("KabutoComponent");
KabutoComponent->SetupAttachment(BodyMesh);
NeckComponent = CreateDefaultSubobject<USkeletalMeshComponent>("NeckComponent");
NeckComponent->SetupAttachment(BodyMesh);
NecklaceComponent = CreateDefaultSubobject<USkeletalMeshComponent>("NecklaceComponent");
NecklaceComponent->SetupAttachment(BodyMesh);
ShoulderAdditionComponent = CreateDefaultSubobject<USkeletalMeshComponent>("ShoulderAdditionComponent");
ShoulderAdditionComponent->SetupAttachment(BodyMesh);
ShoulderComponent = CreateDefaultSubobject<USkeletalMeshComponent>("ShoulderComponent");
ShoulderComponent->SetupAttachment(BodyMesh);
TrouserComponent = CreateDefaultSubobject<USkeletalMeshComponent>("TrouserComponent");
TrouserComponent->SetupAttachment(BodyMesh);
}
Do you know if there’s a way to give them a custom order?
Thank you in advance!