UHT doesn't handle enum mapping properly

Perhaps there’s a way to get UHT to accept this with a flag, but I don’t know what it is.

UENUM(BlueprintType)
enum class EConvexHullMethod : uint8
{
	USE_6_DOP = NxConvexHullMethod::Enum::USE_6_DOP UMETA(DisplayName="6 DOP")
}

Throws this error: Enumerator value: Missing constant integer

I understand it’s sanity checking the UENUM, but that would probably compile just fine. I should have a way to tell it to trust me.

The other option is super ugly and is what I am going to have to do if I can’t find a flag to fix this.

UENUM(BlueprintType)
enum class EConvexHullMethod : uint8
{
	USE_6_DOP = 0;// NxConvexHullMethod::Enum::USE_6_DOP UMETA(DisplayName="6 DOP")
}

I sure hope that enum doesn’t change!

Hi,

UHT isn’t a full C++ compiler, so when it compiles enums, it expects constant initialisers to enumerators. This is because it doesn’t know what NxConvexHullMethod::Enum is.

So I’m afraid you have to go with your workaround. On the plus side, it’s unlikely that NxConvexHullMethod is going to change. :slight_smile:

Steve