Description

This is a bug that can make it confusing for users (and internal devs) to make custom nodes related to enums. 

 

This is occuring because the PC_Enum type was added after the original PC_Byte but 

FNodeFactory::CreateK2PinWidget was never updated to return the correct pin type for it. 

It should return the same thing as using PC_Byte does, which is a nice dropdown of the enum types. 

A note from Michael N: ideally everything that's currently an enum with PC_Byte would move over to PC_Enum and remove the strange legacy of the Enum ptr on UByteProperty, but it is probably a non-trivial refactor

 

 

[Image Removed]

Steps to Reproduce
  1. Find a UEnum to use as an example (any UENUM will work)
  2. Using the CreatePin method inside of a node's AllocateDefaultPin function, do the following
// Image on the left uses:
CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Byte, StaticEnum<EInputPinEnum>(), EnumInputPinName);

// And the right uses
CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Enum, StaticEnum<EInputPinEnum>(), InputPinName);

Result: Two different pin types would be created

Expected: The result should be the same

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-120214 in the post.

2
Login to Vote

Backlogged
ComponentUE - Gameplay - Blueprint Editor
Affects Versions4.275.0
CreatedJul 23, 2021
UpdatedJun 24, 2022
View Jira Issue