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.
This bug still exists - or I hit another one. Re-compiling everything, closing the editor - as mentioned in the bug - does not work. I have a situation where I had a test enum defined which was then removed from the code. After several re-compilations and an editor restart later, it used that old enum definition even though it is no longer within the compiled code. Very strange. Enums are not functioning at the moment. (Version 4.18.3)
Maybe another bug, maybe the same. What I found is that the *.generated.h does not include a correct declaration/definition of the corresponding declaration/definition in the users header file.
In my example below a simple enum type is declared/defined within Test1.h. This enum is used within a struct so it can be edited from within the editor. At the very end of the Test1.generated.h is the generated enum stuff, but instead of the 4 defined types within the enum, only 3 are there.
If I add the missing entry manually and re-compile, it shows up in the editor. But when trying to select an item in the list, the editors log shows:
LogClass: Warning: In asset 'None', there is an enum property of type 'HOTRELOADED_EMyEnumItem_0' with an invalid value of 'OE_Entry1'