Gameplay Architecture Refactor
Issue: Architecture became increasingly difficult to extend after multiple production updates.
Root cause: Tight coupling between gameplay systems and scene-specific logic.
Fix: Refactored gameplay systems into isolated runtime modules with explicit ownership boundaries.
Result: Feature integration time reduced from ~6–10 hours to ~1–2 hours for medium-sized gameplay changes.
GC Spikes During Runtime Initialization
Issue: Noticeable GC spikes during async gameplay transitions.
Root cause: Task-based async flow generated avoidable allocations during initialization.
Fix: Migrated async runtime systems from Task to UniTask.
Result: Reduced allocations from ~1.2–2.5 KB/frame to ~0.2–0.4 KB/frame during transitions.
AI Update Scheduling
Issue: AI update cost scaled poorly with large enemy counts.
Root cause: Per-frame navigation and targeting evaluation for all active entities.
Fix: Introduced staggered AI update scheduling and throttled recalculation cycles.
Result: Reduced CPU spikes from ~5-10 ms to ~2-3 ms during high-density gameplay scenarios.