Adapting Systems with an Adapter

In a world full of different types of cables and plugs, we have all become accustomed to the concept of adapters. The Adapter pattern will be one of those patterns that will be easy for you to grasp because it correlates so perfectly with our real-world experiences with technology. The Adapter pattern's name perfectly reveals its core purpose; it offers us a way to seamlessly use old code with new code by adding an interface between the code that will act as an adapter.

The following topics will be covered in this chapter:

  • Understanding the Adapter pattern
  • Implementing the Adapter pattern
The examples presented in this chapter are skeleton code. It's simplified for learning purposes so we can focus on the ...

Get Game Development Patterns with Unity 2021 - Second Edition 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.