Build every gameplay system as a self-contained UPM package. Data lives in ScriptableObjects, behavior lives in small single-responsibility MonoBehaviours, and systems talk through SO Event Channels — never direct references.
| One system = one UPM package | Create a "shared contracts" package with interfaces | | Data in ScriptableObjects, behavior in MonoBehaviours | Put data and behavior in the same class |
| MonoBehaviour [SerializeField] only for SO refs, component refs, scene refs, UnityEvents | [SerializeField] primitives (float, int, bool, string, LayerMask, enum, AnimationCurve) directly on MonoBehaviours — these belong in an SO Config asset | | SO Event Channels for cross-system communication | Use singletons, service locators, or static managers |
يُستخدم عند إنشاء أنظمة ألعاب Unity قابلة لإعادة الاستخدام، أو إنشاء حزم UPM، أو تصميم بنية معيارية قائمة على ScriptableObject لأنظمة اللعب مثل المخزون أو القتال أو الحوار أو المهام أو الحفظ/التحميل. يُستخدم أيضًا عند توصيل حزم Unity المستقلة المتعددة التي تحتاج إلى الاتصال دون تبعيات مباشرة. المصدر: eyenpi/unity-systems-skills.