How to break struct from c++ function?

Hello. I created structure:

USTRUCT(BlueprintType)
struct FCheckItemsForStackStruct
{
	GENERATED_USTRUCT_BODY()

		UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "CheckItemsForStack Struct")
		AInventoryBaseItem* ItemStack;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "CheckItemsForStack Struct")
		bool CanBeStacked;

	FCheckItemsForStackStruct()
	{
		ItemStack = nullptr;
		CanBeStacked = false;
	}
};

And function which returns struct-type value:

	UFUNCTION(BlueprintCallable, BlueprintPure)
		FCheckItemsForStackStruct CheckItemsForStack(AInventoryBaseItem* Item);

But I can’t break returned value in BP:

How to resolve this problem?

Make it Blueprintable instead of BlueprintType

     USTRUCT(Blueprintable)
     struct FCheckItemsForStackStruct
     {
3 Likes

Ok, Thanks :slight_smile: It’s works with Blueprintable after restarting the editor

expose all of the variables of the struct with BlueprintReadWrite

1 Like