Adding to existing C++ Enum does not update blueprints using the enum.
I created a C++ character class which uses a custom C++ Enumeration in a variable called CharacterState:
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?
asked Mar 02 '17 at 12:47 AM in Bug Reports
Workaround for changing C++ enumerations:
1) Close the editor.
2) Make the enum change in your IDE (Add, Remove, Rename or Reorder)
3) Delete the Binaries folder in your project.
4) Recompile the project through the IDE.
5) Reopen the editor and everything will be alright.
answered Mar 02 '17 at 01:37 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here