Initial commit

This commit is contained in:
Meta Vens 2026-04-18 06:04:39 +01:00
commit 137cb2ce13
215 changed files with 659023 additions and 0 deletions

View file

@ -0,0 +1,31 @@
using R3;
using UnityEngine;
namespace GameCult.Logging.Unity
{
public class UnityLogger : ILogger
{
private readonly bool _isDebugBuild = Debug.isDebugBuild; // Cache Unity-specific
public void LogInfo(string message)
{
Observable.NextFrame().Subscribe(_ => Debug.Log($"[INFO] {message}"));
}
public void LogWarning(string message)
{
Observable.NextFrame().Subscribe(_ => Debug.LogWarning($"[WARN] {message}"));
}
public void LogError(string message)
{
Observable.NextFrame().Subscribe(_ => Debug.LogError($"[ERROR] {message}"));
}
public void LogDebug(string message)
{
if (_isDebugBuild)
Observable.NextFrame().Subscribe(_ => Debug.Log($"[DEBUG] {message}"));
}
}
}