Hello!

I have a C++ class, which calls CreateDefaultSubobject on its static mesh component in the constructor, but it crashes the editor!

I've read around this issue, but nothing seems to work.

Can anyone see anything wrong?
Header File:
Code:
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "GameFramework/Actor.h"
#include "InteractiveObject.h"
#include "RSGenerator.generated.h"

UCLASS()
class RSGAME_API ARSGenerator : public AInteractiveObject
{
	GENERATED_BODY()

	UPROPERTY(VisibleDefaultsOnly, Category = Mesh)
	class USkeletalMeshComponent* GenMesh;

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

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

};
Source File:
Code:
// Fill out your copyright notice in the Description page of Project Settings.

#include "RSGame.h"
#include "RSGenerator.h"


// Sets default values
ARSGenerator::ARSGenerator()
{
	GenMesh->CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("Mesh"));
}

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