In my header file of a game controller class, i have multiple structures: FElementData, FElementReference, and FMolecule. In my FMolecule struct, i am aiming to have a list of FElementReferences as one of the properties. So far my code looks like:
USTRUCT(BlueprintType, Category = "GMT Library|Custom Data Types|Structs|Components")
struct FMolecule
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Element Data")
TArray<FElementReference> elements;
FElementReference(TArray<FElementReference> newElements)
:
elements(newElements)
{}
};
Now, I am trying to set a default value for the newElements array, something like:
FElementReference(TArray<FElementReference> newElements = {})
However, that does not work with TArray. I’m getting a variety of errors depending on what I put and I’m just really confused. I have the FElementReference struct before this one, and the FElement before that, if that helps. Also, my class declaration is after all structs.