Strip debug logging from the game, fix screen weirdness

This commit is contained in:
Michal Pikulski
2025-10-14 15:53:58 +02:00
parent 18be597424
commit e8180b21bf
65 changed files with 768 additions and 411 deletions

View File

@@ -1,6 +1,7 @@
using AppleHills.Core;
using UnityEngine;
using System;
using Core;
namespace AppleHillsCamera
{
@@ -168,7 +169,7 @@ namespace AppleHillsCamera
{
if (debugMode)
{
Debug.Log($"Camera adjusted event received by {gameObject.name}, updating position");
Logging.Debug($"Camera adjusted event received by {gameObject.name}, updating position");
}
// Ensure we have the latest camera reference
@@ -210,14 +211,14 @@ namespace AppleHillsCamera
if (_camera != null && adapter.GetControlledCamera() == _camera)
{
cameraAdapter = adapter;
Debug.Log($"EdgeAnchor on {gameObject.name} auto-connected to CameraScreenAdapter on {cameraAdapter.gameObject.name}");
Logging.Debug($"EdgeAnchor on {gameObject.name} auto-connected to CameraScreenAdapter on {cameraAdapter.gameObject.name}");
return;
}
}
// If no matching camera found, use the first one
cameraAdapter = adapters[0];
Debug.Log($"EdgeAnchor on {gameObject.name} auto-connected to CameraScreenAdapter on {cameraAdapter.gameObject.name}");
Logging.Debug($"EdgeAnchor on {gameObject.name} auto-connected to CameraScreenAdapter on {cameraAdapter.gameObject.name}");
}
}
@@ -237,7 +238,7 @@ namespace AppleHillsCamera
{
if (debugMode)
{
Debug.Log($"{gameObject.name}: Camera ortho size changed from {_lastOrthoSize} to {_camera.orthographicSize}");
Logging.Debug($"{gameObject.name}: Camera ortho size changed from {_lastOrthoSize} to {_camera.orthographicSize}");
}
_lastOrthoSize = _camera.orthographicSize;
shouldUpdate = true;
@@ -296,7 +297,7 @@ namespace AppleHillsCamera
}
else if (_camera != prevCamera && debugMode)
{
Debug.Log($"{gameObject.name}: Camera reference updated to {_camera.name}");
Logging.Debug($"{gameObject.name}: Camera reference updated to {_camera.name}");
}
}
@@ -340,7 +341,7 @@ namespace AppleHillsCamera
{
if (referenceMarker == null)
{
Debug.LogWarning("EdgeAnchor: Missing reference marker.");
Logging.Warning("EdgeAnchor: Missing reference marker.");
return;
}
@@ -377,7 +378,7 @@ namespace AppleHillsCamera
// Apply the new position
if (debugMode && Vector3.Distance(transform.position, newPosition) > 0.01f)
{
Debug.Log($"{gameObject.name} position updated: {transform.position} -> {newPosition}, Camera OrthoSize: {_camera.orthographicSize}");
Logging.Debug($"{gameObject.name} position updated: {transform.position} -> {newPosition}, Camera OrthoSize: {_camera.orthographicSize}");
}
transform.position = newPosition;