Attach class componet to parent class

Im trying to attach my scene component to my parent class PaperSpriteComponent but gives me this error
“Cannot convert argument 1 from UPaperSpriteComponent* to U SceneComponent*”

Can anyone help me fix this?

Parent h:

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = “Component”)
USceneComponent* SceneComponent;

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Component")
	class UPaperSpriteComponent* Body;

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Component")
class	UArrowComponent*Arrow;

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Box")
	UBoxComponent* BoxComponent;

UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "EnemyCapsule")
class UCapsuleComponent* EnemyCapsule;

parent cpp:

SceneComponent = CreateDefaultSubobject<USceneComponent>("RootComponent");

RootComponent = SceneComponent;

Body = CreateDefaultSubobject<UPaperSpriteComponent>("PrimarySprite");

Body->AttachTo(RootComponent);


Arrow = CreateDefaultSubobject<UArrowComponent>("Arrow1");
Arrow->AttachTo(Body);

BoxComponent = CreateDefaultSubobject<UBoxComponent>("Box");
BoxComponent->AttachTo(RootComponent);

EnemyCapsule = CreateDefaultSubobject<UCapsuleComponent>("EnemyCapsule");
EnemyCapsule->AttachTo(Body);

Child h:

ABasicTurret();

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Spawner")
USceneComponent* SceneComponent1;

bool ReFire;

child cpp:

ABasicTurret::ABasicTurret()
{
SceneComponent1 = CreateDefaultSubobject(“Spawner”);
SceneComponent1->AttachTo(Body);
ReFire = false;

}

I fixed it :slight_smile: it was something simple and embarrassing. lol

How did you do it?

Please explain