We have just added the Object Pool pattern to our toolkit—this is one of the most valuable patterns for Unity developers. As we saw in our code examples, we can easily recycle instances of frequently used objects. When dealing with a large set of entities that need to spawn quickly and repeatedly, this pattern can help us avoid CPU spikes and lags. These benefits can only help make our game better, as players do enjoy a game that runs smoothly.
In the next chapter, we are going to decouple components from each other with the Observer pattern.