I have created a subobject of my combat controller (derives from UActorComponent) on my base Character class using
// h file
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Combat, meta = (AllowPrivateAccess = "true"))
UCombatController * combatController;
// cpp file in constructor
combatController = CreateDefaultSubobject(TEXT("Combat");
and I am able to edit all of the UPROPERTY variables on that subobject.
I now need to make a subobject of the Combat Controller class of type USphereComponent and I would like to be able to edit the shape properties in the details panel.
My first thought was to add similar code to the Combat Controller class.
// h file
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Combat, meta = (AllowPrivateAccess = "true"))
USphereComponent *lockOnRange;
// cpp file in constructor
lockOnRange = CreateDefaultSubobject(TEXT("Lock On Range"));
When I select the Lock On Range object in the Level Editor, I can edit the Sphere properties, but it doesn’t draw the wireframe.
When I select the Lock On Range object in the Blueprint Editor for my Character object, it shows the wireframe, but the Details panel is completely empty.
Any help would be greatly appreciated.
EDIT: more descriptive title