[ARCH] 9+ scattered singletons with no lifecycle management #17

Open
opened 2026-03-12 00:03:05 +00:00 by lavarius · 0 comments
Owner

🟠 High — Architecture

9+ singletons with no unified lifecycle management:
ChatProcessor, CharacterStore, MainCameraInstance, InputSystemSpawner, OBSWebSocketManager, FaceTracker, FaceTrackingManager, TwitchWebSocketClient, WebSocketServerManager

Problems:

  • Unpredictable initialization order
  • No centralized shutdown/cleanup
  • Hard to test in isolation

Fix (choose one):

  • Introduce a ServiceLocator or lightweight DI (Zenject / VContainer)
  • Or a GameServices bootstrapper ScriptableObject that owns initialization order
  • At minimum: consolidate DontDestroyOnLoad handling and document the init order
## 🟠 High — Architecture 9+ singletons with no unified lifecycle management: `ChatProcessor`, `CharacterStore`, `MainCameraInstance`, `InputSystemSpawner`, `OBSWebSocketManager`, `FaceTracker`, `FaceTrackingManager`, `TwitchWebSocketClient`, `WebSocketServerManager` Problems: - Unpredictable initialization order - No centralized shutdown/cleanup - Hard to test in isolation **Fix (choose one):** - Introduce a `ServiceLocator` or lightweight DI (Zenject / VContainer) - Or a `GameServices` bootstrapper `ScriptableObject` that owns initialization order - At minimum: consolidate DontDestroyOnLoad handling and document the init order
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lavarius/ProjectOverlay#17
No description provided.