missing type specifier - int assumed error with GENERATED_BODY()

I have this struct in one of my header files:

USTRUCT()
struct FHostileSpawnRequest
{
    GENERATED_BODY()
    
    EEnemyType EnemyType;
    int32 Remaining = 0;
    TArray<FVector> SpawnLocations;
    
    bool IsValid() const
    {
       return Remaining > 0 && !SpawnLocations.IsEmpty();
    }
};

and I’m getting the error:

0>MassEnemyMisc.h(27,2): Error C4430 : missing type specifier - int assumed. Note: C++ does not support default-int
GENERATED_BODY()
^

From what I know compiling with structs tends to cause a lot of problems, but I can’t figure out how to fix it. Does anyone know a solution?

Depending on the rest of the header file, you may need to include CoreMinimal.h or ObjectMacros.h.

You might also just be missing the include for the generated.h.

I was missing the generated.h! Thank you!