{ }Blueprint → C++

Unreal Engine 5 · Blueprint → C++

Implement an Interface in Unreal Engine 5 C++UE Docs

To implement an interface in C++, add the I-class to your class's inheritance list (public IMyInterface) and override the function as Interact_Implementation, not Interact.

Blueprint node & C++ equivalent

C++
// .h
class AMyActor : public AActor, public IMyInterface
{
  GENERATED_BODY()
  virtual void Interact_Implementation() override;
};

// .cpp
void AMyActor::Interact_Implementation() { /* ... */ }

How to implement an interface on an actor

In the header, list the interface alongside your base class: class AMyActor : public AActor, public IMyInterface. The actor now satisfies the interface contract and the reflection system records that AMyActor implements UMyInterface.

Because the interface function was declared BlueprintNativeEvent, you override Interact_Implementation() rather than Interact(). The engine generates the non-suffixed Interact thunk that dispatches to your implementation or to a Blueprint override.

The .h and .cpp split

The header declares virtual void Interact_Implementation() override;. The override keyword ensures you match the interface signature exactly and catches typos at compile time. The .cpp then defines the body: void AMyActor::Interact_Implementation() { /* ... */ }.

This is the C++ equivalent of dropping into a Blueprint Interface event in the Blueprint editor and adding nodes to its graph.

Common mistakes

Overriding Interact() instead of Interact_Implementation() is the most frequent error and usually produces a function that never gets called. For BlueprintNativeEvent and BlueprintImplementableEvent interface functions, always override the _Implementation variant.

Frequently asked questions

Why do I override _Implementation instead of the interface function directly?+

For BlueprintNativeEvent functions the engine generates the base function as a dispatcher, so your C++ logic must live in Interact_Implementation. Overriding the plain Interact would hide the dispatcher and break Blueprint overrides.

How do I make an actor implement multiple interfaces in C++?+

Add each interface to the inheritance list, for example public AActor, public IMyInterface, public IOtherInterface, and override the relevant _Implementation function from each.

Do I need to call Super in an interface _Implementation override?+

Only if a parent class provides a meaningful base implementation you want to extend. Interface defaults are usually empty, so a Super:: call is optional unless your hierarchy defines one.

Related Interfaces nodes

View all Interfaces nodes →