How to have variable under UStruct of type static mesh?

I am doing this but the code is not compiling and giving an error that StaticMesh is not defined.

Code:

USTRUCT(BlueprintType)
struct FST_ItemFashion : public FTableRowBase // FST_ItemFashion is inherited from FTableRowBase, the sign : is used for inheritance
{
	GENERATED_BODY()
public:
		//Setting the Item Fashion Structure, a data table will derive from it to modify fashion items in various cases
		UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Fashion Items Related")
		EFashionType Type;
		UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Fashion Items Related")
		FName Name; 
		UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Fashion Items Related")
		UTexture2D Icon;
		UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Fashion Items Related")
		USkeletalMeshComponent SkeletalMesh;
		UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Fashion Items Related")
		UStaticMeshComponent StaticMesh;

};

Thank You

USTRUCT(BlueprintType)
struct FST_ItemFashion : public FTableRowBase // FST_ItemFashion is inherited from FTableRowBase, the sign : is used for inheritance
{
	GENERATED_BODY()
public:
	//Setting the Item Fashion Structure, a data table will derive from it to modify fashion items in various cases
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Fashion Items Related")
		EFashionType Type;
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Fashion Items Related")
		FName Name;
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Fashion Items Related")
		UTexture2D* Icon;
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Fashion Items Related")
	class USkeletalMesh* SkeletalMesh;
	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Fashion Items Related")
	class UStaticMesh* StaticMesh;

};
2 Likes