Can I use the C++ Enum in AI BT Blackboard?

I have an ENUM definded in C++'s code
and it’s usable in Blueprints

UENUM(BlueprintType)
enum class NPCState : uint8{
	Patrolling UMETA(DisplayName = "Patrolling"),
	Alerted UMETA(DisplayName = "Alerted"),
};

I am able to use it in blueprints with no problem, however I cannot use it as a Blackboard enum value, is there any way to do this ?

You can use it by typing its name into the Enum Name text box of the blackboard details panel and pressing enter.

68147-enumtype.jpg

26 Likes

Lots of Thanks !! :smiley:

1 Like

Why isn’t that documented anywhere? I’ve been looking for that for 3 hours. Thank you!

2 Likes

Many thanks, this is helpful!

It shows up in every other list. Silly of us to expect it in that one. Sometimes… I mean…
Thanks for the info.