I am getting an error that says
Error: static assertion failed with “Uknown access specifier for Generated_BODY() macro in class WeapLauncher”
There are no other errors in the c++ script or header, just this one line.
#pragma once
#include "GameFramework/Actor.h"
#include "WeapLauncher.generated.h"
USTRUCT()
struct FWeaponData
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditDefaultsOnly, Category = Ammo)
int32 MaxAmmo;
UPROPERTY(EditDefaultsOnly, Category = Config)
float TimeBetweenShots;
UPROPERTY(EditDefaultsOnly, Category = Config)
float WeaponRange;
};
UCLASS()
class HAUNTED_API AWeapLauncher : public AActor
{
// private:
GENERATED_BODY()
UFUNCTION()
void Fire();
UPROPERTY(EditDefaultsOnly, Category = Config)
FWeaponData WeaponConfig;
public:
// Sets default values for this actor's properties
AWeapLauncher(const class FObjectInitializer& ObjectInitializer);
// Set Components
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Collision)
class UBoxComponent* CollisionComp;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Config)
class USkeletalMeshComponent* WeaponMesh;
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
};