Created a struct, but now I can't compile due to "Monolithic Mode"

I created a blank class that i used to make a struct,

#pragma once

#include "CoreMinimal.h"
#include <string>
#include <UObjectBase.h>

/**
 * 
 */
USTRUCT(BlueprintType)
struct FWeaponStats
{
	GENERATED_BODY();

	UPROPERTY()
	float reloadSpeed;

	UPROPERTY()
	bool unlocked;

	WeaponStats()
	{
		reloadSpeed= 1;
		unlocked = false;
	}
};

I have tried every variation that i can find online. This issue seems to stem from unreal it’s self, and it’s compile. This code may or may not work at this point, but hitting compile says;

Warning: RebindPackages not possible for specified packages (or application was compiled in monolithic mode.)

I haven’t found any information relating to this issue other then one person saying they can’t turn it on, and another saying they can turn it off in linux. I did make an AActor and it compiled, but it won’t compile again, seems it will compile if i make a new class… but it ridicules that i’d have to make a class every time i want to compile.

I solved my issue, it was down to the order i was doing things.

  1. Make a class that uses one of unreals classes (i picked empty, that doesn’t work)
  2. make your struct or what have you here or add more code, your good now

What i did was

  1. made an empty classes (didn’t set up unreals stuff)
  2. made another class (tried to compile but failed so it didn’t make unreals stuff)

My codes was also broken was i couldn’t test, for completeness here’s the working struct

#pragma once

#include <UObjectBase.h> //just to get the Autosuggest working right
#include "CoreMinimal.h"
#include "WeaponStats.generated.h" //forgot this, but need it becuase of the generated function below

/**
 * 
 */
USTRUCT(BlueprintType)
struct TD_SHOOTER_API FWeaponStats //needed the api call, and F infront as it's a struct, and thats F, you can look up the rest
{
	GENERATED_USTRUCT_BODY()

	UPROPERTY(BlueprintReadWrite)
	float reloadSpeed;

	UPROPERTY(BlueprintReadWrite)
	bool unlocked;

	FWeaponStats()
	{
		reloadSpeed = 1;
		unlocked = false;
	}
};