Interface defines in C++ can not be called in blueprint

#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.

Hey Henry.
Checkout the Tutorial I wrote about writing C++ Interfaces which can be implemented in either C++ or Blueprint classes.
Of course they can also be called by Blueprints :slight_smile:

Tutorial

Good Luck :slight_smile:

#pragma once

#include "ItemActionsInterface.generated.h"

UINTERFACE(Blueprintable)
class UItemActionsInterface : public UInterface
{
    GENERATED_UINTERFACE_BODY()
};

class IItemActionsInterface
{
    GENERATED_IINTERFACE_BODY()

public:
    UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Pickup", meta = (DisplayName = "Pickup Item"))
    bool PickupItem(class AItemActor* InItemActor);

    UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "Match", meta = (DisplayName = "Match Item"))
    bool MatchItem(int32 MatchType);
}; 

The solution is adding ‘BlueprintCallable’ property to the functions.