How to create an enum pin in custom UK2Node ?

Does anyone here have a snippet for creating an enum input pin in a custom UK2Node ?
In AllocateDefaultPins method, I use the CreatePin function, but I can’t find a way to type an input pin with a specific enum of my own ! (or any other enum by the way)

I know how to do that with bool, string, and float values:


	const UEdGraphSchema_K2* DefaultSchema = GetDefault<UEdGraphSchema_K2>();


	UEdGraphPin* BooleanPin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Boolean, "My Boolean Pin Name");
	DefaultSchema->SetPinAutogeneratedDefaultValue(BooleanPin, TEXT("false"));

	UEdGraphPin* StringPin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_String, "My String Pin Name");
	DefaultSchema->SetPinAutogeneratedDefaultValue(StringPin, TEXT("DefaultValue"));

	UEdGraphPin* FloatPin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Real, UEdGraphSchema_K2::PC_Float, "My Float Pin Name");
	DefaultSchema->SetPinAutogeneratedDefaultValue(FloatPin, TEXT("0.0"));

but I can’t find a way to use CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Enum,
Any help appreciated^^
Thanks !

I have my solution^^

You have to use UEdGraphSchema_K2::PC_Byte for that case !
(it may be related to that issue: Unreal Engine Issues and Bug Tracker (UE-120214))

A working way to create an Enum pin is doing it like that :

UEnum* PropertyEnum = StaticEnum<MyCppEnum>();
UEdGraphPin* MyCustomPin = CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Byte, PropertyEnum, "PinName");