BP Struct from Marketplace used in C++

I have marketplace content I want to use that contains a Blueprint Struct called “S_Task”.
I created an FMission struct in C++ that has a property that needs an array of S_Tasks.

How can I expose the BP struct so I can use it in my C++ struct?

#pragma once

#include "CoreMinimal.h"
#include "Engine/UserDefinedStruct.h"
#include "MissionType.h"
#include "Mission.generated.h"

USTRUCT(BlueprintType)
struct FMission
{
    GENERATED_BODY()

    // ID of the mission
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Mission")
    int32 ID;

    // Name of the mission
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Mission")
    FString Name;

    // Type of the mission
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Mission")
    TEnumAsByte<EMissionType> MissionType;

    // Tasks of type blueprint S_Task
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Mission")
    TArray<S_Task> Tasks;
};
1 Like

You can’t. The solution is to remake the struct in C++ (with a different name to avoid clashes), then replace all Blueprint references with that struct.

4 Likes