The kit follows a ScriptableObject-based architecture. If you are not familiar with it, we recommend watching the following videos:
- Unite 2016 - Overthrowing the MonoBehaviour Tyranny in a Glorious Scriptable Object Revolution
- Unite Austin 2017 - Game Architecture with Scriptable Objects
At the core of this architecture is the idea of using ScriptableObjects to manage all (or most) of the data in your game. ScriptableObjects are Unity assets that live in your project and can be used to store any kind of data. While they are most commonly used for configuration data, we can actually exploit them to represent many other gameplay concepts. In the particular case of Match 2 Kit Pro, we use ScriptableObjects for the following things:
- Item definitions.
- Goal definitions.
- Player variables (lives, coins, moves).
- Game events.
The main advantage of this architecture is that it provides a very clean and flexible approach to managing the complexity of a game codebase and exposes many concepts to your designers on the Unity editor-side that would normally require programmer intervention.