Description

Performing a hot reload after updating an Enum will not reflect the update until the editor is closed/reopened.

UPDATE (8/23/17):
Restarting the editor dose not immediately update the enum. When the editor is restarted, it will treat the Enum as a Byte instead of Enum. If a custom enum is updated/hot reloaded, associated blueprint nodes need to be replaced.

UPDATED WORKAROUND:
Compiling the code with the editor closed (rather than preform a hot reload) will update the existing nodes properly.

Steps to Reproduce
  1. Create blank code project
  2. In -ProjectName-Gamemode.h add the following:
    UENUM(BlueprintType)        //"BlueprintType" is essential to include
     enum class EUnitStatistic : uint8
     {
         HEALTH                  UMETA(DisplayName = "Health"),
         ACTION_POINTS         UMETA(DisplayName = "ActionPoints"),
     };
    
  3. Compile
  4. In the editor, create a new blueprint based on actor
  5. In the Event graph add new variable and set its type to UnitStatistic
  6. Add instance of the variable to the graph (note the dropdown had 2 options)
  7. In Visual Studio add the following to the existing Enum:
     aaaa         UMETA(DisplayName = "aaaa"),
    
  8. Compile to trigger hot reload
  9. In the editor, open the Blueprint's event graph

Result:
The Enum node added in step 6 still only has two options after adding a third in code. Restarting the editor will update the Enum and show the third option.

Expected:
Triggering hot reload updates code based Enums

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

21
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint
Affects Versions4.9.24.15
CreatedOct 13, 2015
ResolvedAug 18, 2021
UpdatedAug 18, 2021