Description

UUserDefinedEnum contains an array of FTexts which are supposed to be used as localized display names, however these are populated from the underlying UEnum type using the meta-data on the object. This means that the display names themselves aren't stable, and in addition to this preventing them being properly localized, also causes issues for deterministic cooking.

We should instead have this array default to the value of the enum entry name, but allow the user to change this via a text field in the enum editor. UUserDefinedEnum::GetEnumText should not call the UEnum version, nor should UUserDefinedEnum::PostLoad do anything to ensure these display names exist... basically, we need to kill FEnumEditorUtils::EnsureAllDisplayNamesExist being called by anything other than the enum editor itself.

We could also consider making DisplayNames a TMap of FName -> FText, now that both UHT and the localization gather support map properties.

Steps to Reproduce

Internal issue. No observable change.

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-26274 in the post.

0
Login to Vote

Fixed
ComponentTools - Localization
Affects Versions4.12
Target Fix4.15
Fix Commit3213158
Main Commit3229477
CreatedFeb 1, 2016
ResolvedNov 29, 2016
UpdatedMay 16, 2017