You just have organize your includes like this:
#include “CoreMinimal.h”
#include “Components/ActorComponent.h”
#include “Engine/TriggerVolume.h”
#include “OpenDoor.generated.h”
and then have only ONE empty line before UCLASS, or it will produce errors.
So, generally, you must have a code like this at the top of your file, and everything will work fine:
#include “CoreMinimal.h”
#include “Components/ActorComponent.h”
#include “Engine/TriggerVolume.h”
#include “OpenDoor.generated.h”
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )