BlueprintNativeEvent in an Interface Compiler Error

I’m trying to add an UInterface in C++ that has a bunch of BlueprintNativeEvent functions, but cannot get it to compile no matter what. Given the following code:


#pragma once

#include "CoreMinimal.h"
#include "SelectableInterface.generated.h"

// This class does not need to be modified.
class USelectableInterface : public UInterface

class GAMEJAM2018_VGDC_API ISelectableInterface
	 * Called when the player selects/deselects this actor
	 * BlueprintNativeEvent, so you can override in Blueprints. Remember, in
	 *   C++ this means the .cpp file should only have 
	 *   UpdateSelection_Implementation(...) !
	UFUNCTION(BlueprintNativeEvent, Category = "Selectable")
		void UpdateSelection(ESelectionState State = ESelectionState::Active);



#include "SelectableInterface.h"

void ISelectableInterface::UpdateSelection_Implementation(ESelectionState Type)
	UE_LOG(LogTemp, Error, TEXT("ISelectableInterface::UpdateSelection() not implemented/calls super!"));

I get the compilation error

SelectableInterface.h(34): error C2039: 'UpdateSelection_Implementation': is not a member of 'ISelectableInterface'
SelectableInterface.h(33): note: see declaration of 'ISelectableInterface'

with line 34 being the GENERATED_BODY() in ISelectableInterface.

I’ve tried not defining the function in .cpp at all, I’ve tried dropping _Implementation off the definintion, I’ve tried adding BlueprintCallable, I’ve tried overriding it in another class, I’ve tried a complete rebuild; each time, I still get the same error.


You are missing declaration of UpdateSelection_Implementation function in your header.

Just add

virtual void UpdateSelection_Implementation(ESelectionState State = ESelectionState::Active);


void UpdateSelection(ESelectionState State = ESelectionState::Active);