Expose external enum to blueprints

I have an enum defined in a third party header file which I cannot modify and I need to expose this enum to Blueprints.

It can be done manually, by creating my own enum which has the same values as the external enum, e.g.:

UENUM(BlueprintType)
namespace MyEnum {
	enum Type {
		Apple = 0, // ExternalEnum::Apple is 0
		Banana = ExternalEnum::Banana,
		Pear =  ExternalEnum::Pear,
	}
}

then use MyEnum in Blueprints, and type casting in C++ code, e.g.:

ExternalEnum var = (ExternalEnum) MyEnum::Banana;

But since I have a fair amount of enums to expose to Blueprints, it’s tiresome doing it this way.

Is there a more practical way to do it?

Can I expose to Blueprints directly the external enum without creating my own?

1 Like

Any solution?

1 Like