How to write extensible code in Unity (5) ??? Loosely Coupled Architecture

Okay, after seeing that scary Unit case earlier, how can we implement the so-called loose coupling architecture?

Here, I will divide the entire Unit program into four parts for consideration: data layer, visual layer, logic layer, and composition layer.

Data layer

The data layer is used to handle data such as a player’s health, attack power, movement steps, etc. In Unity, ScriptableObject can be used to store fixed data, which will be introduced in detail in the following chapters. Here, I will show you its code.

Click Here