Chapter 7. Communication between Classes and Interfaces

This chapter shows you how to write your own UInterfaces, and demonstrates how to take advantage of them within C++ to minimize class coupling and help keep your code clean. The following recipes will be covered in this chapter:

  • Creating a UInterface
  • Implementing a UInterface on an object
  • Checking if a class implements a UInterface
  • Casting to a UInterface implemented in native code
  • Calling native UInterface functions from C++
  • Inheriting UInterface from one another
  • Overriding UInterface functions in C++
  • Exposing UInterface methods to Blueprint from a native base class
  • Implementing UInterface functions in Blueprint
  • Creating C++ UInterface function implementations that can be overridden in Blueprint

Get Unreal Engine 4 Scripting with C++ Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.