Description

Changing and compiling a custom struct in C++ will break behavior of Make/Break Struct nodes in blueprints if the blueprint is saved after the compile.

Regression:
No - blueprint fails to save after detailed code change in 4.14.3

Workaround:
If the node is already placed in the blueprint, saving the blueprint before compiling code and/or declining to save changes to the blueprint will show the updated node (TestVar3) on project restart.

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add code class based on actor (MyActor)
  3. Add the following code to MyActor.h above UCLASS() macro
    USTRUCT(BlueprintType)
    struct FTestStruct
    {
    GENERATED_USTRUCT_BODY()
    UPROPERTY(EditAnywhere, BlueprintReadOnly)
    int32 TestVar;
    
    UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Points")
    int32 TestVar2;
    };
    
  4. Compile
  5. Create blueprint based on actor (ActorBP)
  6. Add Break TestStruct node
  7. In code, add the following to FTestStruct
    UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Points")
    int32 TestVar3;
    
  8. Compile
  9. Save the blueprint
  10. Close and restart the project
  11. Reopen ActorBP

Result:
Break TestStruct node now reads "Break <unknown struct>" and all variables are missing

Expected:
TestVar 3 pin is added to Break Struct node after hot reload / project restart

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-43838 in the post.

20
Login to Vote

Won't Fix
CreatedApr 10, 2017
ResolvedAug 18, 2021
UpdatedAug 18, 2021
View Jira Issue