As a side note, one thing got in my way with implementing interfaces, that is the official documentation:
In the example, the override to the interface method in the derived class header is written this way:
[Trap.h]
public:
virtual bool ReactToTrigger() override;
…compiling though it looks like this is seen as an overload of the interface class method instead.
What seems to be working instead is:
public:
bool ReactToTrigger() override;
A bit more practical example, as it is presently working for me:
[Interface.h]
class IMyInterface
{
GENERATED_BODY()
public:
virtual bool MyMethod() const
{
return false;
}
};
//###############################################
[MyClass.h that implements Interface]
UCLASS()
class UMyClass : public UObject, public IMyInterface
{
GENERATED_BODY()
public:
bool MyMethod() const override;
};
//###############################################
[MyClass.cpp]
bool UMyClass::MyMethod() const
{
//Implementation code....
}