Hey all,
I have a simple interface that I’m trying to inherit from, but I keep getting the following error:
Class ‘WalkingMovementState’ cannot extend interface ‘MovementStateInterface’, use ‘implements’
I’m making my changes in a local copy of the release branch from GitHub (so that puts me on 4.8.2 I believe).
Code Below:
(MovementStateInterface.h)
#pragma once
#include "MovementStateInterface.generated.h"
UINTERFACE(MinimalApi, meta = (CannotImplementInterfaceInBlueprint))
class UMovementStateInterface : public UInterface
{
GENERATED_UINTERFACE_BODY()
};
class ENGINE_API IMovementStateInterface
{
GENERATED_IINTERFACE_BODY()
public:
virtual void OnEnterState() {};
virtual void OnExitState() {};
virtual void Update() = 0;
virtual const FString& GetMovementStateName() const = 0;
};
(WalkingMovementState.h) - Where the error is popping up.
#pragma once
#include "GameFramework/MovementStateInterface.h"
#include "WalkingMovementState.generated.h"
UCLASS()
class ENGINE_API UWalkingMovementState : public IMovementStateInterface
{
GENERATED_BODY()
public:
UWalkingMovementState(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
virtual void Update() override;
virtual const FString& GetMovementStateName() const override;
};
Any Ideas?