# Interface as parameter on call from Blueprint to C++

**URL:** <https://forums.unrealengine.com/t/interface-as-parameter-on-call-from-blueprint-to-c/385952>\
**Category:** UI\
**Tags:** interface, unreal-engine, bug-report, CPP, Blueprint, question\
**Created:** [February 23, 2017, 5:46pm UTC](https://forums.unrealengine.com/t/interface-as-parameter-on-call-from-blueprint-to-c/385952 "2017-02-23T17:46:36Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![muchcharles](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@muchcharles](https://forums.unrealengine.com/u/muchcharles)\
**Post date:** [May 10, 2018, 3:28am UTC](https://forums.unrealengine.com/t/interface-as-parameter-on-call-from-blueprint-to-c/385952/6 "2018-05-10T03:28:16Z")

</div>

I ran into something very similar, passing an interface reference paramter to a C++ UFUNCTION in a blueprint class that implements a C++ UINTERFACE from blueprint instead of from its C++ base class ends up with the TScriptInterface having a null InterfacePointer.

I then tried passing it as a UObject instead of an interface ref and casting it to the interface with Cast; this failed too. After trying it that way I found this via google:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

The solution in the end using that was:

```
void AFooBasePlayerController::InteractWith(TScriptInterface<IFooInteractable> const & Interactable)
{

	if (Interactable.GetObject() && Interactable.GetObject()->GetClass()->ImplementsInterface(UFooInteractable::StaticClass()))
	{
		if (IFooInteractable::Execute_IsCurrentlyInteractable(Interactable.GetObject()))
		{
			[...]
		}
	}
}
```

---

_[View the full topic](https://forums.unrealengine.com/t/interface-as-parameter-on-call-from-blueprint-to-c/385952)._
