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:
![](https://static.packt-cdn.com/products/9781789809503/graphics/assets/cf51461a-92cc-42bb-b53b-83914ce680dd.png)
- Define the following functions inside ISelectable:
class CHAPTER_07_API ISelectable
{
GENERATED_BODY()
// Add interface functions...