using UnityEditor; using UnityEngine; namespace UnityTcp.Editor.Helpers { internal static class TcpLog { private const string Prefix = "Codely Bridge:"; private static bool IsDebugEnabled() { try { return EditorPrefs.GetBool("UnityTcp.DebugLogs", false); } catch { return false; } } public static void Info(string message, bool always = true) { if (!always && !IsDebugEnabled()) return; Debug.Log($"{Prefix} {message}"); } public static void Warn(string message) { Debug.LogWarning($"{Prefix} {message}"); } public static void Error(string message) { Debug.LogError($"{Prefix} {message}"); } } }