C++ and Blueprint TArray not compatible

Show how you do things in c++ land.

So I defined a TArray in C++. Than I used it in a Blueprint, but everytime i recompile the class where the array is included i have to reapply all connections in the Blueprint…

Do u have a solution for it?
How can i keep the links when i recompile the file…

UPROPERTY(BlueprintReadWrite, Category = “Inventory”)
TArray Inventory;

struct FInventoryData

UPROPERTY(BlueprintReadOnly, Category = "Actor")
	class ABasicPickUp* ActorReference;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "InventoryInformations")
	UTexture2D* ItemImage;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "InventoryInformations")
	FText InformationText;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "InventoryInformations")
	FText UseActionText;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "InventoryInformations")
	uint32 bIsSingleUseOnly : 1;

	ActorReference = NULL;
	ItemImage = NULL;
	InformationText = FText::GetEmpty();
	UseActionText = FText::GetEmpty();
	bIsSingleUseOnly = false;



It seems that you may have hit a bug in blueprint virtual machine and/or compiler.

I’d recommend stripping the project to the minimum that shows the bug and posting it again as a question of type “bug” with the project attached.

Do you maybe use hot reload? If yes, did you try restarting editor? hot reload is sometimes buggus and bugs out reflection data which is essential for bluepritn compilation. Even so it is a bug so i change category Bug Raport

Gonna upgrade to UE version 4.10… Maybe there it is solved :slight_smile:

Hey nonimus-

After testing, this appears to be an issue with hot reloading and specifically an array of structs (using an array of floats/bools did not behave the same). I submitted a bug report (UE-28600) for investigation, however as mentioned - if you close the editor before compiling the nodes will remain intact after relaunching the editor.


Anything I can do to help solve the error or something I should do with the Bug-Report Code? :stuck_out_tongue: