Error : Invalid BlueprintType enum base

I got an Invalid BlueprintType enum base error when defining UEnums below:

// NaItemEffect.h
#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "NaItemEffect.generated.h"

UENUM(BlueprintType)
enum class NAITEMSYSTEM_API ENaItemUsageConsumptionType :uint8 {...};

It shows that uint8 is supported but the error still exists after setting it uint8.

If BlueprintType was removed, another error emerged:

error : Missing '{' in 'Enum'.

If the API macro NAITEMSYSTEM_API was removed, the enum itself went right.

What’s wrong after all with the enum?

Hi SodiumZH,

Just define without the “NAITEMSYSTEM_API” and “class” and “:uint8” so it’s a simple enum with just your enumerators, and when using it as a property in a class, wrap the enum definition in “TEnumAsByte”