I have this really simple code:
#pragma once
#include "AItem.h"
#include "ACompoundItem.generated.h"
USTRUCT(BlueprintType)
struct FCompoundItemComponent
{
GENERATED_USTRUCT_BODY()
AAItem* item;
float contribution;
};
/**
*
*/
UCLASS()
class SETI_PROTOTYPE_1_API AACompoundItem : public AAItem
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Composition")
TArray<FCompoundItemComponent> components;
};
Inside of Blueprint I can add elements to the components array, but the individual elements of that array, which are of the FCompoundItemComponent struct can’t be edited. The individual struct is just empty in BP. If in BP I try to use a “Make CompoundItemComponent” similar to how you would do “Make Vector”, then it doesn’t have any actual inputs.
I’m sure I have just done something wrong to properly wire this up and expose it to Blueprint, I am just not sure what.