C++ Static Mesh of actor not spawning in

I have made a pickup actor and a spawner actor. I after 2 DAYS of debugging and researching I managed to actually spawn the actor but the static mesh does not spawn it with it. Please help!

Parameters of the problem:
1.Mesh non-existent (It is not just invisible)
2.Actor spawns in normally
3.I am new to unreal, accustomed to C++

Code:
Pickup.h

#pragma once

#include "Components/BoxComponent.h"
#include "Components/StaticMeshComponent.h"

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Pickup.generated.h"

UCLASS()
class COOKBOOK_API APickup : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	APickup();

	UPROPERTY(EditAnywhere)
	UStaticMeshComponent* PickupMesh;

	UPROPERTY(EditAnywhere)
	UBoxComponent* PickupBox;

	UFUNCTION()
	void OnPickedUp(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult);

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;
};

Pickup.cpp

#include "Pickup.h"


// Sets default values
APickup::APickup()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	PickupMesh = CreateDefaultSubobject<UStaticMeshComponent>("PickupMesh");
	RootComponent = PickupMesh;

	PickupBox = CreateDefaultSubobject<UBoxComponent>("PickupBox");
	PickupBox->OnComponentBeginOverlap.AddDynamic(this, &APickup::OnPickedUp);
}

void APickup::OnPickedUp(UPrimitiveComponent * OverlappedComponent, AActor * OtherActor, UPrimitiveComponent * OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult)
{
	GLog->Log("Picked Up Pickup!");
	Destroy();
}

// Called when the game starts or when spawned
void APickup::BeginPlay()
{
	Super::BeginPlay();
	
	FVector size(FMath::RandRange(0.3f, 1.0f));
	
	PickupMesh->SetWorldScale3D(size);

	PickupBox->SetWorldScale3D(size * 1.1);

	PickupBox->AttachToComponent(PickupMesh, FAttachmentTransformRules::SnapToTargetNotIncludingScale);
}

// Called every frame
void APickup::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

}

PickupSpawner.h

    #pragma once

    #include "Pickup.h"
    #include "CoreMinimal.h"
    #include "GameFramework/Actor.h"
    #include "PickupSpawner.generated.h"

    UCLASS()
    class COOKBOOK_API APickupSpawner : public AActor
    {
        GENERATED_BODY()

    public:
        // Sets default values for this actor's properties
        APickupSpawner();

    protected:
        // Called when the game starts or when spawned
        virtual void BeginPlay() override;

    public:
        // Called every frame
        virtual void Tick(float DeltaTime) override;

        UPROPERTY(EditAnywhere)
        USceneComponent* Scene;

        void SpawnPickup();

        UPROPERTY(EditAnywhere)
        TSubclassOf<class APickup> PickupToSpawn;

    };

PickupSpawner.cpp

    #include "PickupSpawner.h"
    #include "Kismet/KismetMathLibrary.h"
    #include "Public/TimerManager.h"
    #include "Engine/World.h"

    // Sets default values
    // Sets default values
    APickupSpawner::APickupSpawner()
    {
        // Set this actor to call Tick() every frame.  You can turn this off                 to improve performance if you don't need it.
        PrimaryActorTick.bCanEverTick = true;

        Scene = CreateDefaultSubobject<USceneComponent>("Scene");

    }

    // Called when the game starts or when spawned
    void APickupSpawner::BeginPlay()
    {
        Super::BeginPlay();

        FTimerHandle DummyHandle;
        GetWorldTimerManager().SetTimer(DummyHandle, this, &APickupSpawner::SpawnPickup, 3.f, true);

    }

    // Called every frame
    void APickupSpawner::Tick(float DeltaTime)
    {
        Super::Tick(DeltaTime);

    }


    void APickupSpawner::SpawnPickup()
    {

        FTransform SpawnTransform = Scene->GetComponentTransform();
        FVector SpawnLocation = SpawnTransform.GetLocation();
        SpawnLocation.X += FMath::RandRange(-200.0f, 200.0f);
        SpawnTransform.SetLocation(SpawnLocation);

        GetWorld()->SpawnActor<APickup>(APickup::StaticClass(), SpawnTransform);
        GLog->Log("Spawned the UsefulActor.");
    }

Please post the APickup code too.

OK, I posted it the Pickup code

1.its not enough to have a static mesh component. the way u set it up u can set the mesh in blueprints so this not might be the error

  1. u should initzialate the components of the actor, inside of the constructor. attachcomponent might only work there.

  2. also u need to attach pickupmesh to the rootcomponent. or make the pickupmesh the root component.

Sorry, I did not specify but I am spawning a blueprint of the class pickup already. Attaching the box component to the static mesh in the constructor did nothing and I already have the static mesh as root component.

u need to attach the static mesh/box components somehow to the root component thats for sure.
just leave the box component away and then try to attach te static mesh component to the root component.
u can check it in the ue4editor how it looks when u add a meshcomponent there for example. there is kind of a hirachy which shows how the components are attached.

this is how i do it and it works like a charm:

AUSActor::AUSActor(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{

mMESH = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
mMESH->SetupAttachment(RootComponent);
mMESH->bHiddenInGame = false;
mMESH->SetMobility(EComponentMobility::Stationary);