A potential use case for the Adapter in Unity is when you have a third-party library that you downloaded from the Unity Asset Store, and you need to modify some of its core classes and interfaces to add new features. But when changing third-party code, you risk having merge issues every time you pull an update from the library owners.
Hence, you find yourself in a situation where you choose to wait for the third-party library owners to integrate the changes you need or modify their code and add the missing features. Both choices have their risks versus rewards. But the Adapter pattern gives us a solution to this dilemma by letting us place an adapter between existing classes so they can work together without modifying them directly.
Let's imagine we are working on the code base of a project that uses an inventory system package downloaded from the Unity Asset Store. The system is excellent; it saves the player's purchased or gifted inventory items...