If a custom code based enum is used inside a blueprint, doing a hot reload will break the nodes by assuming they are of a type other than enum.
1. Open UE4Editor (any project)
2. Add code to project based on Actor (MyActor)
3a. In MyActor.h add the following above the UCLASS() macro:
UENUM(BlueprintType) enum class ETestEnum : uint8 { EnumInt, EnumFloat, EnumString, EnumBasic };
3b. Add UPROPRETY() variable for enum in MyActor.h
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test) ETestEnum MyValue;
4. Compile
5. Create Blueprint based on MyActor (MyActorBP)
6. In the event graph, Click the eye in the MyBlueprint panel and set show inherited variables
7. Add Key Press Event (T) and wire into Set node for Enum. Wire Enum into print string node.
8. In the code, add a new UPROPERTY() variables (float) and compile to trigger a hot reload
Result:
Enum Set node and conversion node to print string have errors after the hot reload
Head over to the existing Questions & Answers thread and let us know what's up.
1 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.8.3, 4.9 |
Created | Aug 3, 2015 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |