How to make C++ interface's functions callable in blueprints

Hi Guys

How to make C++ interface’s functions callable in blueprints? This is possible?

I searched a lot for this and found nothing

In blueprint system i can create blueprint interface, create some function and associate this blueprint interface in others blueprints and create interactions for that function.

Also i can create in c++ some interface with some function and create some actor with this interface and override that function for increase my interaction like blueprints.

But if i create my interface in c++ and create a blueprint and associate this interface, how i need to do in code for my function to be visible

My Interface code:

#pragma once
#include “InteractActor.generated.h”

/**
*
*/
UINTERFACE(MinimalAPI)
class UInteractActor : public UInterface
{
GENERATED_UINTERFACE_BODY()
};

class IInteractActor
{
GENERATED_IINTERFACE_BODY()

virtual void OnInteract(AController *other);

};

any help is very useful :slight_smile:

I believe you need to actually implement your interface in a C++ class, via multiple inheritence

as per my tutorial here:

THEN in that class you can specify BlueprintImplementable Functions

as per my tutorial here:

Rama

Thank you very much Rama, you are genius…

Works perfecly for me

:slight_smile:

In general, the need to actually use interfaces is dropped.

What’s the solution?

hey, I had the same problem. what’s the solution? How to modify the ur code ?

Hey jasielmacedo. I made a little Tutorial about how to use C++ Interface in Blueprint and C++.
I also managed to process these functions through C++ Code (a nice method which I unfortunately have not seen before).
Also gratitudes to Rama who indirectly helped me with his Tutorials about Interfaces :slight_smile: