code-conventions-unity
Code Conventions — Unity / C# (The1Studio prohibitions)
Section titled “Code Conventions — Unity / C# (The1Studio prohibitions)”Extends core code-conventions.md. Only the deviations/prohibitions that must hold while writing — the full convention set lives in t1k-unity-base-code-conventions, the authoring-time SSOT.
Prohibitions (always-loaded, reviewer-facing)
Section titled “Prohibitions (always-loaded, reviewer-facing)”- DOTween is BANNED — no new
using DG.Tweening;/.DO*(); migrate existing usages on touch. LitMotion ONLY — zero-alloc, Burst-adjacent, MIT. - VContainer ONLY — never Zenject (legacy,
#if GDK_ZENJECTonly). Events viaSignalBus. Subscribe/unsubscribe with named methods, not lambdas. - UniTask over coroutines for new async; R3 for reactive binding. Dispose subscriptions in
OnDestroy()— trackIDisposable. - Private fields
camelCase, NO underscore prefix,this.mandatory for member access.[SerializeField] private— always private, no underscore. UPPER_SNAKE_CASEconstants;PascalCaseenums/values. NamespacesProjectName.Feature.Component, max 3–4 levels.- Logic/presentation split (
MonoBehaviouronly): pure game logic stays testable without booting the engine (t1k-game-arch). Does not apply insideISystem— it + itsIComponentDataalready IS the tested logic layer.
A convention not covered here: ask, then update the skill. A deviation stated above wins over the skill.
Full detail
Section titled “Full detail”t1k-unity-base-code-conventions — casing tables, DI, DOTS specifics, editor-script standards, anti-patterns.
Related
Section titled “Related”code-conventions.md (core) · mono-pool-spawn-unity.md · prefab-only-construction-unity.md · game-feedback-mandate-unity.md · t1k-game-arch