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:
- Add IInterface—in this case, IMyInterface—to the public inheritance list for our new Actor class:
#pragma once
#include "CoreMinimal...