Default value for Enum parameter of a BP function

I created a BP function with an Enum parameter.

The Enum is, for example:

Enum MyEnum { First, Second }

(I wrote it in C++, but it is actually in Blueprint).

I want to set a default value for that parameter. When I open the details tab of the function, I would expect to have a dropdown list for the Enum parameter that let me choose the default value. Instead there is still a generic text box in which I have to write something. If I write the string value of MyEnum, like “Second”, it doesn’t work. If I write “NewEnumerator1” it works! It basically wants the name of the entry that is automatically generated when you create new entries for the Enum in the editor.

Is this the right behaviour? As I said, I’d prefer to select the value from a dropdown list with all the entries of my Enum type.

Thank you

It should work automatically if your enum is a UEnum, is it?

It doesn’t for me. Creating the Enum in Blueprint or in C++ (as UEnum) gets me the same behaviour, it shows just a text box in the editor.

If you really want to understand what’s happening there, you could try debugging it using the Widget reflector (in Window → developer tools).

Could you copy and paste the code of your BP function declaration?

Thank you for your replies.

With the Widget reflector I can clearly see that it is creating an SEditableTextBox rather than an STextBlock.

My BP function is defined in the editor, there is no C++ declaration, it’s a function of a Blueprint class. Adding an enum parameter to the function I get this.


How are you declaring your custom enum in C++?

I just encountered this, and entering the full name of the enum value worked for me.
My enum in c++:

enum EDialogPriority
	DP_Queue			UMETA(DisplayName = "Add to Queue"),
	DP_Immediate		UMETA(DisplayName = "Play immediately"),
	DP_DropIfPlaying	UMETA(DisplayName = "Drop if dialog playing"),
	DP_Max				UMETA(Hidden),

My default value field: DP_Queue

I copy “Make Literal Enum” node to text editor and figured it out




0 is first element in enum

NewEnumerator + Index

But I think it is a pain to set the parameter if it has no dropdown list