Can't inherit from actor in plugin that implements a plugin interface

I have a plugin, in which I have defined two types.
The first one is a simple actor extending APlayerController

UCLASS()
class NETPRIVELEGES_API APrivelegedPlayerController : public APlayerController
{

	GENERATED_BODY()

};

The second type is a simple interface:

UINTERFACE()
class NETPRIVELEGES_API UCommandHandler : public UInterface
{
	GENERATED_BODY()
};

class NETPRIVELEGES_API ICommandHandler
{
	GENERATED_BODY()

public:

	UFunction* FindCommand(const FString& commandString) const;

	ECommandExecutionStatus ParseArguments(const UFunction* const command, const FString& argString, FCommandArgs& OutArgs) const;

	void ExecuteCommand(const UFunction* const command, const FCommandArgs& commandArgs) const;

};

Now, I have a third type in my primary game module, which is anther actor that extends the above APrivelegedPlayerController:

#include "MyPlugin/PrivelegedPlayerController.h"
...

UCLASS()
class ROCKETPROPELLEDBALL_API ARPBPlayerControllerBase : public APrivelegedPlayerController
{
	GENERATED_BODY()
	
public:

	ARPBPlayerControllerBase();

	UFUNCTION()
	void Command_SanityCheck(const FString& args);

	UFUNCTION()
	void Command_ArgTest(const FString& arg1, int arg2);

};

This compiles great, and everything is sunshine and flowers. Now I just want APrivelegedPlayerController to implement ICommandHandler – it’s signature would change to:

class NETPRIVELEGES_API APrivelegedPlayerController : public APlayerController, public ICommandHandler

Uh, oh, now all of a sudden I am getting cryptic linking errors…
(NOTE: I still get the linking errors even after providing implementations of the interface methods)

I have no idea what is causing it, as it seems perhaps this is UHT failing at some step.

Something to note is that even though these are linking errors for unresolved symbols on APrivelegedPlayerController, the errors go away if I just change ARPBPlayerControllerBase to inherit directly from APlayerController, leaving my plugin controller referencing the interface – this ONLY breaks when I inherit the plugin player controller from the main game module.

TL;DR

I get linking errors if I have an actor in my primary game module inheriting from a base actor in my plugin module, only when that base actor implements a plugin interface.

Side note: I gave examples but I tried this out on multiple actors and interfaces. They all result in the same issue.

Any ideas?

Hi there! You need to add Engine module to Public dependencies in your plugin Build.cs file. The thing is - you need all stuff about APlayerController to inherit from it. As you can see (APlayerController | Unreal Engine Documentation) this class is in Engine module