Blueprint struct variable, error on recompile

I’m having an incredibly time consuming and frustrating issue which using C++ declared (but Blueprint Type marked) structs in blueprint. My struct looks like this:

USTRUCT(BlueprintType)
struct FDataFile
{
	GENERATED_USTRUCT_BODY()

	UPROPERTY(BlueprintReadWrite, Category = DataFiles)
		float fileSize;
	UPROPERTY(BlueprintReadWrite, Category = DataFiles)
		FString fileName;
	UPROPERTY(BlueprintReadWrite, Category = DataFiles)
		FString fileContents;
	UPROPERTY(BlueprintReadWrite, Category = DataFiles)
		TSubclassOf<UUserWidget> fileType;

	FDataFile()
	{
	}
};

The issue I’m having is that whenever I make any edit in the C++ script this struct is delcared in (either to the struct itself or the class in the same .h file) and then recompile (this is using compile from editor, so a hot reload in case that matters), every struct I have as a blueprint variable errors with the message “The variable variableX in blueprintY has an invalid type Array of Structures” (In this case it’s an array, but the same happens for single struct variables.) Meaning I have to completely redeclare the variable and remake any links or functions it was being used in.

I’m not using cpp with my project but there is a similar error you get when modifying structures or array structures in blueprints.

First I’d like to confirm that you’re not trying to use an array structure within an array – the engine seems to have a ton of issues with this.

Moving on: If you make a change to your structure or have try going into every blueprint that uses the structure and save/compile. May fix your issue, here’s to hoping.

Hey Distul,

Thanks for coming with some answers.

No I’m not using arrays within arrays (although my structure itself does contain a TArray, would that matter?) but the array of structures in the blueprint is on its own.

I have tried compiling the scripts, but the errors persist. I found a similar issue:

Which seems to suggest I just shouldn’t hot reload. I will try that for a while and see if I continue to get no errors.

This issue seems to have been fixed by subsequent builds, I’m now on 4.11