How do you deal with renaming an enum value that is used in a lot of assets?

For example, say I have some enum like the following:

UENUM(BlueprintType)
enum class EMyEnumType : uint8
{
	Value1,
	Value2,
	Value3,
};

And then I have some property somewhere that references it:

UPROPERTY(EditDefaultsOnly)
EMyEnumType EnumValue;

If I have a lot of blueprint assets that reference a specific value of the enum, say EMyEnumType::Value2, how do I deal with updating all references if EMyEnumType::Value2 gets renamed, lets say to EMyEnumType::Value666.

When testing this I can see in the editor that it shows “EMyEnumType MAX” and it outputs a warning to the log, but only when you open the blueprint editor for an asset that is using the enum:

LogEnum:Warning: In asset ‘blah’,
there is an enum property of type
‘EMyEnumType’ with an invalid value of
‘EMyEnumType::Value2’

This seems like it would be very hard to manually find every blueprint that is using this enum and update their values one-by-one since you could easily miss one and not know about it. Are there any tools for making this process less painful?

You can use enum redirectors in your project’s INI file. Search BaseEngine.ini for “EnumRedirects” to see how it’s done.

For example:

+EnumRedirects=(EnumName="EMyEnumType",OldEnumEntry="EMyEnumType::Value2",NewEnumEntry="EMyEnumType::Value666")

Awesome! That’s super clean. Thanks!