FGeometryScriptPrimitiveOptions struct causing compile errors

Hello everyone

Recently I started learning C++ for UE5. I also started playing around with geometry scripting and I wanted to try writing some C++ code for it. So I created a child C++ from DynamicMeshActor, but whenever I try to use the FGeometryScriptPrimitiveOptions struct as a function argument, I get compile errors (same thing happens when I try to use it as a variable)
Here’s the header:

#pragma once

#include "CoreMinimal.h"
#include "DynamicMeshActor.h"
#include "GeometryScript/MeshPrimitiveFunctions.h"
#include "DynamicMeshTest.generated.h"

/**
 * 
 */
UCLASS()
class CPPTEST_API ADynamicMeshTest : public ADynamicMeshActor
{
	GENERATED_BODY()
	
public:
	ADynamicMeshTest();

public:
	UFUNCTION(BlueprintCallable) 
		void Build(FGeometryScriptPrimitiveOptions PrimitiveOptions);
};

And here’s the CPP file:


#include "DynamicMeshTest.h"

ADynamicMeshTest::ADynamicMeshTest()
{
	PrimaryActorTick.bCanEverTick = false;
}
void ADynamicMeshTest::Build(FGeometryScriptPrimitiveOptions PrimitiveOptions)
{
	UDynamicMeshComponent* DynamicMeshComp = FindComponentByClass<UDynamicMeshComponent>();
	UDynamicMesh* DynamicMesh = DynamicMeshComp->GetDynamicMesh();
}

And the errors I’m getting:

What am I doing wrong?

If you are compiling an error within your own plugin, you may have forgotten to add a module reference and added a “GameFramework” reference in Build.cs