Interfaces in C++ are giving me an assertion failure

Hi there,

I’m attempting to create an interface in C++. I’ve essentially copy pasted the code from the page on C++ interfaces in the (unreal documentation). My code is giving me an assertion error at the parser level:

Assertion failed: InterfaceGeneratedBodyLine > 0 [File:d:\build++ue4+release-4.19+compile\sync\engine\source\programs\unrealheadertool\private\ParserHelper.h] [Line: 1526]

The code I have:

#pragma once

#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "CutsceneInterface.generated.h"

UINTERFACE(Blueprintable)
class WORDPROJECTPROTOTYPE_API UCutsceneInterface : public UInterface
{
	GENERATED_BODY()
};

I’ve dug into this a little in terms of the source code and from what I can gather, when compilation is going through, the parser can’t find the GENERATED_BODY() line. I’ve attempted to swap this out with GENERATED_INTERFACE_BODY() and it has the same effect.

This is the function that the assert is failing on in ParserHelper.h:

/**
	 * Gets interface generated body line number for this class.
	 */
	int32 GetInterfaceGeneratedBodyLine() const
	{
		check(InterfaceGeneratedBodyLine > 0);
		return InterfaceGeneratedBodyLine;
	}

From what I’ve gathered via the variables that are set upon construction, this means that the generated body line is not being found, as it is set to a default of -1.

Has anyone else run into this problem or am I just doing something incorrect when it comes to setting up interfaces in C++ for UE4?

Thanks

My mistake; I didn’t realise that I also required the interface class declaration below the UInterface class I.e:

UINTERFACE(Blueprintable)
class WORDPROJECTPROTOTYPE_API UCutsceneInterface : public UInterface
{
	GENERATED_BODY()
};

class WORDPROJECTPROTOTYPE_API ICutsceneInterface
{
	GENERATED_BODY()
public:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "Cutscene Function")
	void PerformCutsceneAction();
};