I was wondering how to setup child actor components in C++ and have them correctly exposed in Blueprint.
My current code is:
SCharacter.h
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Components")
UChildActorComponent* GunSlot;
SCharacter.cpp
GunSlot = CreateDefaultSubobject<UChildActorComponent>(TEXT("GunSlot"));
GunSlot->SetChildActorClass(ASWeapon::StaticClass());
GunSlot->SetupAttachment(GetMesh());
The problem is none of the details are exposed:
Desired solution (Done in BP):
My goal is to learn C++ and keep BP usage minimal.