I think I’ve found bug in 4.9.2. Changes mede to UENUM are not getting reflected in editor until restart:
repro:
Create blank C++ project out of “blank” template.
Fire VS and go to [projectName]GameMode.h file.
Add this code before class definition:
UENUM(BlueprintType) //“BlueprintType” is essential to include
enum class EUnitStatistic : uint8
{
HEALTH UMETA(DisplayName = “Health”),
ACTION_POINTS UMETA(DisplayName = “ActionPoints”),
};
Recompile and Hot Reload
Go to editor, create empty blueprint class, inherit it from actor
Open this blueprint, add local variable of type EUnitStatistic. Note that it has two values “Health” and “ActionPoint”. Up til now everything is ok.
Update enum by adding new statistic:
aaaa UMETA(DisplayName = “aaaa”),
Compile, hot reload
Go to editor and exammine variable created in point 6. Try to change its value to aaaa. The variable is not present. Error.
Restart editor. Now value is present.
P.S. My newlines after each point somehow (again) are disappearing.
Unfortunately this still happens in 4.10. Admittedly I didn’t follow these steps, but I’ve had the same problem in my project. I guess I just have to rebuild the editor, and go and make tea while I wait…
I’ve stopped using enums at all. They are just broken. This is not the only problem with them. In 4.9.2 (under which I am working now) it happens that after You reopen editor all enum values change their type from enum to byte which causes blueprints to not compile.
That particular issue you mention with the type being changed to byte has been reportedly fixed in 4.10. As for your original issue, I’ll look into that and see what I can find.
It appears that there is a bug report in for Enum entries not updating on Hot Reload as well, although it has not been fixed as of yet. I’ll update the community interest on the bug so that maybe it’ll be fixed sooner rather than later but I cannot make any guarantees. For your reference, the bug number is UE-22059, in case you need to ask for updates.
4.20 reporting in! Needed to restart the error to fix it. Blueprint using the enum wouldn’t compile until I fixed all the nodes cause it “remembered” how the enum was until added new entries. 4.21.1 is out currently but haven’t migrated to it.
4.21 the issue still present. Having enum with 50+ entries requires to reconnect all nodes when adding 1 new entry and recompiling. FUntastic waste of everybody’s time, EPIC.