[QUALITY] Debug.Log calls left in production interaction/trigger paths #24

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

🟡 Medium — Code Quality

Debug.Log calls left in hot interaction/trigger paths run in production builds, adding overhead and spamming the console:

  • CallElevator.cs L42 — logs on every elevator call
  • Elevator.cs L27/29 — logs on every floor event
  • ObjectParenter.cs L12-15/23 — logs on every trigger enter/exit

Fix: Wrap in #if UNITY_EDITOR or use a conditional logging utility:

#if UNITY_EDITOR
Debug.Log("Elevator called");
#endif

Or create a DevLog.Log() wrapper that compiles away in release builds.

## 🟡 Medium — Code Quality `Debug.Log` calls left in hot interaction/trigger paths run in production builds, adding overhead and spamming the console: - `CallElevator.cs` L42 — logs on every elevator call - `Elevator.cs` L27/29 — logs on every floor event - `ObjectParenter.cs` L12-15/23 — logs on every trigger enter/exit **Fix:** Wrap in `#if UNITY_EDITOR` or use a conditional logging utility: ```csharp #if UNITY_EDITOR Debug.Log("Elevator called"); #endif ``` Or create a `DevLog.Log()` wrapper that compiles away in release builds.
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#24
No description provided.