#pragma once
#include "ItemActionsInterface.generated.h"
UINTERFACE(Blueprintable)
class UItemActionsInterface : public UInterface
{
GENERATED_UINTERFACE_BODY()
};
class IItemActionsInterface
{
GENERATED_IINTERFACE_BODY()
public:
UFUNCTION(BlueprintNativeEvent, Category = "Pickup", meta = (DisplayName = "Pickup Item"))
bool PickupItem(class AItemActor* InItemActor);
UFUNCTION(BlueprintNativeEvent, Category = "Match", meta = (DisplayName = "Match Item"))
bool MatchItem(int32 MatchType);
};
Used in c++.
IItemActionsInterface::Execute_PickupItem(OtherActor, Item);
It is ok in C++. But can not find the Pickup Item in Blueprint Context Menu.
I was using Unreal Engine 4.12.3
I tried many methods, but all failed. I think this is a bug in engine.