Now that we have created a UInterface, we can say that an object has all of the functions defined or implements them. In this recipe, we will see exactly how to do that.
Implementing a UInterface on an object
Getting ready
Ensure that you've followed the previous recipe so that you have a UInterface ready to be implemented.
How to do it...
- Create a new Actor class using the Unreal Wizard, called SingleInterfaceActor:
![](https://static.packt-cdn.com/products/9781789809503/graphics/assets/7e99dfee-3068-4773-a9e3-442b78c69dc1.png)
- Add IInterface—in this case, IMyInterface—to the public inheritance list for our new Actor class:
#pragma once
#include "CoreMinimal...