using UnityEditor; using UnityEngine; namespace MCPForUnity.Editor.Helpers { internal static class McpLog { private const string Prefix = "MCP-FOR-UNITY:"; private static bool IsDebugEnabled() { try { return EditorPrefs.GetBool("MCPForUnity.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}"); } } }