right click on a actor in your content browser then click on “Copy Reference” (It will copy its path)
in the class.h
TSubclassOf<class AClass> ActorToSpawn
Class.cpp
#include "Engine.h"
#include "Engine/Blueprint.h"
static constructorHelpers::FObjectFinder<UBlueprint> type a name for your variable here( Text("past that path here"));
if (yourVariable.Succeeded())
{
ActorToSpawn= (UClass*)yourVariable.Object->GeneratedClass;
}