It seems to be a bit out of date, especially when we now have different syntax for constructors.
Has anyone figured out how to create interfaces in 4.7.x?
#pragma once
#include "Interact.generated.h"
/** Class needed to support InterfaceCast<IToStringInterface>(Object) */
UINTERFACE(MinimalAPI)
class UInteract : public UInterface
{
GENERATED_UINTERFACE_BODY()
};
class IInteract
{
GENERATED_IINTERFACE_BODY()
IInteract(const FObjectInitializer& obj = FObjectInitializer::Get());
virtual void Interact();
};
UINTERFACE(Blueprintable, Category = "Event Brain, Interfaces")
class MYGAME_API UTimeOfDayEventInterface : public UInterface
{
GENERATED_UINTERFACE_BODY()
public:
};
class ITimeOfDayEventInterface
{
GENERATED_IINTERFACE_BODY()
public:
ITimeOfDayEventInterface(const FObjectInitializer & PCIP);
..
};
UTimeOfDayEventInterface::UTimeOfDayEventInterface(const FObjectInitializer & PCIP)
: Super(PCIP)
{
..
}
// Not sure if this is safe tough, never done it my self but it compiles.
ITimeOfDayEventInterface::ITimeOfDayEventInterface(const FObjectInitializer & PCIP = FObjectInitializer::Get())
{
..
}