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

@@ -2,6 +2,7 @@
using UnityEngine;
using UnityEngine.AddressableAssets;
using System;
using Core;
namespace AppleHills.Core.Settings
{
@@ -91,13 +92,13 @@ namespace AppleHills.Core.Settings
Debug.LogError($"Failed to load developer settings at '{key}': {e.Message}");
}
Debug.LogWarning($"Developer settings of type {type.Name} not found at addressable path '{key}'");
Logging.Warning($"Developer settings of type {type.Name} not found at addressable path '{key}'");
// Fallback to Resources for backward compatibility
T resourcesSettings = Resources.Load<T>($"{_addressablePath}/{type.Name}");
if (resourcesSettings != null)
{
Debug.Log($"Found developer settings in Resources instead of Addressables at '{_addressablePath}/{type.Name}'");
Logging.Debug($"Found developer settings in Resources instead of Addressables at '{_addressablePath}/{type.Name}'");
_settingsCache[type] = resourcesSettings;
return resourcesSettings;
}

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Core;
using UnityEngine;
namespace AppleHills.Core.Settings
@@ -20,7 +21,7 @@ namespace AppleHills.Core.Settings
public static void Register<T>(T service) where T : class
{
_services[typeof(T)] = service;
Debug.Log($"Service registered: {typeof(T).Name}");
Logging.Debug($"Service registered: {typeof(T).Name}");
}
/// <summary>
@@ -35,7 +36,7 @@ namespace AppleHills.Core.Settings
return service as T;
}
Debug.LogWarning($"Service of type {typeof(T).Name} not found!");
Logging.Warning($"Service of type {typeof(T).Name} not found!");
return null;
}
@@ -45,7 +46,7 @@ namespace AppleHills.Core.Settings
public static void Clear()
{
_services.Clear();
Debug.Log("All services cleared");
Logging.Debug("All services cleared");
}
}
}