[Bug Report] BlueprintImplementableEvent and Interfaces don't work together

#pragma once
#include "TargetInterface.generated.h"
class UTargetInterface :
	public UInterface

class ITargetInterface{
        UFUNCTION(BlueprintImplementableEvent, meta=(FriendlyName = "On Interact"))
	void OnInteract();

It compiles fine and I can access the event in my blueprints but it will always throw an error when I call OnInteract(). It works fine if I put the BlueprintImplementableEvent in a normal class.

I think I had that problem too.
I assume you do something like this?

InterfaceOfMyActor= InterfaceCast<ITargetInterface>(Actor);

For some reason you are not allowed to call the function directly if implemented via an interface.
Instead do this (Note: First function argument is the Actor the Interface is casted from. Followed by all normal function args you want to send.):

InterfaceOfMyActor= InterfaceCast<ITargetInterface>(Actor);

I don’t know why you have to do it this way. But for me it works fine…

Edit - correction:
Forgot an underscore. It should be

Many thanks, that seems to work.

A quicker way of doing this, without the need for an explicit cast, is to use the static helper function we automatically generate with interfaces. In your example, assuming that your interface is called “ITargetInterface”, you could simply call:


which does the cast, and conditional call in one handy function!