Adding a struct as seperate file

I’m trying to implement a basic dialogue system by following a tutorial. I’m trying to add a struct like this:

#include "CoreMinimal.h"

#include "UObject/NoExportTypes.h"

#include "Engine/DataTable.h"

#include "MyObject.generated.h"

USTRUCT(BlueprintType)

struct FMyObject : public FTableRowBase

{

	GENERATED_BODY()
	
};

But it doesn’t work. Unreal just crashes and after reopening it just ignores the file and I can’t even see it in the content browser. I tried reopening the editor after saving the struct, tried basically everything on the net.

Hi Aliasmoh5,

try using GENERATED_USTRUCT_BODY() rather than GENERATED_BODY()

and USTRUCT(Blueprintable) rather than USTRUCT(BlueprintType)

(also, that should be an .h file)

cheers

f