Description

As one clicks on the enum fields trying to form an input, the log is written with a variation of the following:

[2025.02.14-17.42.38:940][521]LogNiagaraEditor: Error: Error getting default value for enum pin. Enum value 3 is not supported for enum type ETestBitfieldEnum. Using value Bit0

I have tracked this problem back to `FNiagaraEditorEnumTypeUtilities::GetPinDefaultStringFromValue`, where the calls to `UEnum::IsValidEnumValue` and `UEnum::GetNameStringByValue` fail to consider the case of bitfield enums, and an otherwise valid combination of enum bitflags is considered invalid, causing the selection to default back to the first enum member. None of these three functions have any changes between the versions we have in our 5.3 branch and the ue5-main branch, therefore I suspect that this bug is still present. A fix might involve using `UEnum::GetValueOrBitfieldAsString` instead of the combination of `IsValidEnumValue` and `GetNameStringByValue`, since all the relevant checks are done in it and take bitfield enums into account. Extra error checking could be performed by making sure the returned string isn't empty.

Steps to Reproduce

See linked UDN.

If a UENUM has the UseEnumValuesAsMaskValuesInEditor meta tag set, then the module input doesn't correctly allow the selection of two or more values.

Have Comments or More Details?

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

0
Login to Vote

Backlogged
ComponentUE - Niagara
CreatedFeb 17, 2025
UpdatedMar 3, 2025
View Jira Issue