Hey guys!
i created a simple new interface ( following the tutorial in the wiki ).
but i can not inherit from it. the compiler cannot find the include file “Usable.h”
Every source file is in the MyGame directory. If i omit the include, the base class if
undefined. i also tried to predeclarate it, but with no success. whats wrong?
// Usable.cpp
#pragma once
#include "Usable.generated.h"
UINTERFACE(MinimalAPI)
class UUsable :public UInterface
{
GENERATED_UINTERFACE_BODY()
};
class IUsable
{
GENERATED_IINTERFACE_BODY()
virtual void OnUsed(AController * user);
};
// Usable.cpp
#include "MyGame.h"
UUsable::UUsable(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
}
void IUsable::OnUsed(AController * user)
{
}
// Crate.h
#pragma once
#include "Usable.h"
#include "Crate.generated.h"
UCLASS()
class ACrate : public AActor, public IUsable
{
GENERATED_UCLASS_BODY()
virtual void OnUsed(AController* c) OVERRIDE;
};