One side-effect of UInterfaces allowing inheritance in C++ is that we can override default implementations in subclasses as well as in Blueprint. This recipe shows you how to do so.
Overriding UInterface functions in C++
Getting ready
Follow the Calling native UInterface functions from C++ recipe in which a Physics Cube has already been created so that you have the class ready.
How to do it...
- Create a new Interface called Selectable:
- Define the following functions inside ISelectable:
class CHAPTER_07_API ISelectable
{
GENERATED_BODY()
// Add interface functions...