Referencing this variable in my blueprint works as expected.
BUT when I go to add a new value to my enumeration the blueprint does not behave as excepted.
I added a new variable to the ECharacterState enum: Flying
After compiling the code I do not see the new enumeration in the blueprint code:
The first thing that is wrong, is that the Enum did not get recompiled. A work around for this is to declare a temporary variable in the header file (of the enum type):
This forces the enum to be recompiled.
The Flying value still does not show in the Blueprint.
The only way to make it work is to add a new Character State getter node, and create a new equality operator.
The top line of code has the new Flying enum value, but the bottom line does not.
This is a serious problem. If you ever change an enumeration after it has already been used in Blueprints, you would have to update every single place using that enumeration. What can I do to fix this?
This is a known issue that we are already aware of (UE-22059). Your workaround is fine, but step 3 is not strictly necessary. Simply performing a standard, non-hot reload compile in Visual Studio with the Editor closed should provide the updated enum to the Editor when the project is opened again.