Literal enums are reset after hot reloading

Hi, I’m having this same issue right now. I’ll post some code and screenshots:

I’m defining this enum our StaticLibrary.h

UENUM(BlueprintType)
enum class ECombatState : uint8
{
	CS_InCombat UMETA(DisplayName = "Combat"),
	CS_FreeCam UMETA(DisplayName = "FreeCam")
};

Then I use it here in a blueprint:

After this I make changes to code in the class which my blueprint inherits from. I just added this float:

UPROPERTY(EditAnywhere,BlueprintReadWrite, Category ="Tunning")
float sensitivity;

Then hit compile in the editor:

Then I go to the blueprint and voila:

Notes: The blueprint I’m using here, inherits from a C++ class that inherits from ACharacter

Edit: I did another test. It looks like this happens when adding or removing UPROPERTY macros. I haven’t tried with other macros yet.

Hi MacDx,

Which version of the Engine were you using when you saw this error appear. I ran some tests using 4.10.4, and I did not see the same results that you described. I made a new Actor code class and added the enum that you mentioned using. After building the project in Visual Studio, I created a Blueprint from the new Actor class, made a setup similar to what you showed from your Blueprint, and added an instance into the level.

At this point I added the new UPROPERTY value you provided, clicked Compile in the Engine to trigger a hot reload, then went back into the Blueprint. No error was visible in the Blueprint.