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.