Description

When an array of a struct, defined in code, is used in a blueprint, preforming a hot reload after making changes to the class with the struct will cause the blueprint nodes relating to the struct become broken prevent the blueprint from compiling.

Workaround:
Closing the editor before compiling (not hot reload) does not break the nodes when the project is reopened.

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add code to project based on Actor (MyActor)
  3. In MyActor.h, add the following struct above the UCLASS macro
    USTRUCT(BlueprintType) struct FInventoryData {
    	GENERATED_USTRUCT_BODY();
    
    	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "InventoryInformations")
    		uint32 bIsSingleUseOnly : 1;
    
    	FInventoryData()
    	{
    		bIsSingleUseOnly = false;
    	}
    };
    
  4. Add the following array declaration inside the class definition
    	UPROPERTY(BlueprintReadWrite, Category = "Inventory")
    		TArray<FInventoryData> Inventory;
    
  5. Compile
  6. Create a blueprint based on MyActor (MyActorBP)
  7. In the event graph, right click and add Get Inventory node and ForEachLoop node
  8. Connect BeginPlay node to ForEachLoop node
  9. Connect Get Inventory node to Array input of the loop node
  10. Compile the bluerpint
  11. In code, add a new variable or comment line to force a hot reload
  12. Compile the project with the editor/blueprint open

Result:
Get Inventory node now reports with an error after the hot reload, preventing the blueprint from being compiled.

Expected:
Node Id remains after hot reload

Repro Rate:
3/3

Have Comments or More Details?

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

0
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint
Affects Versions4.11
CreatedMar 21, 2016
ResolvedAug 18, 2021
UpdatedAug 18, 2021
View Jira Issue