I want to add several DefaultSubojects to one Actor:
But all the examples I find just add one using the constructor.
I want to add three
I don’t see in the documentation a suitable constructor for that.
Is there a way to do it?
Thank you so much!!
You can daisy chain the command
AMyCharacterBase::AMyCharacterBase(const FObjectInitializer& objectInitializer) : Super(objectInitializer.SetDefaultSubobjectClass<UCharacterCapsuleComponent>(CapsuleComponentName).SetDefaultSubobjectClass<UCharacterSkeletalMeshComponent>(MeshComponentName))
{
}
Man, You Rock!!
It Is a Builder desing pattern!!
brilliant!!