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

**URL:** <https://forums.unrealengine.com/t/interface-defines-in-c-can-not-be-called-in-blueprint/361991>\
**Category:** UI\
**Tags:** interface, unreal-engine, bug-report, CPP, Blueprint, question\
**Created:** [June 25, 2016, 2:47pm UTC](https://forums.unrealengine.com/t/interface-defines-in-c-can-not-be-called-in-blueprint/361991 "2016-06-25T14:47:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henry\_Read](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Henry\_Read](https://forums.unrealengine.com/u/Henry_Read)\
**Post date:** [June 25, 2016, 2:47pm UTC](https://forums.unrealengine.com/t/interface-defines-in-c-can-not-be-called-in-blueprint/361991/1 "2016-06-25T14:47:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4b3639a6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4b3639a6](https://forums.unrealengine.com/u/anonymous_user_4b3639a6)\
**Post date:** [June 25, 2016, 10:17pm UTC](https://forums.unrealengine.com/t/interface-defines-in-c-can-not-be-called-in-blueprint/361991/2 "2016-06-25T22:17:23Z")

</div>

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 🙂

[Tutorial](https://wiki.unrealengine.com/How_To_Make_C%2B%2B_Interfaces_Implementable_By_Blueprints(Tutorial))

Good Luck 🙂

---

<div class="post-metadata">

**Author:** ![Henry\_Read](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Henry\_Read](https://forums.unrealengine.com/u/Henry_Read)\
**Post date:** [June 26, 2016, 3:03am UTC](https://forums.unrealengine.com/t/interface-defines-in-c-can-not-be-called-in-blueprint/361991/3 "2016-06-26T03:03:21Z")

</div>

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