From 86b4dc14bce60415d85977594c8a9b736293f2ba Mon Sep 17 00:00:00 2001 From: David Sarno Date: Sun, 24 Aug 2025 11:28:47 -0700 Subject: [PATCH] chore(logging): include OS and server version in MCP bridge start log --- UnityMcpBridge/Editor/MCPForUnityBridge.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/UnityMcpBridge/Editor/MCPForUnityBridge.cs b/UnityMcpBridge/Editor/MCPForUnityBridge.cs index 82905cf..7d75908 100644 --- a/UnityMcpBridge/Editor/MCPForUnityBridge.cs +++ b/UnityMcpBridge/Editor/MCPForUnityBridge.cs @@ -310,7 +310,9 @@ namespace MCPForUnity.Editor isRunning = true; isAutoConnectMode = false; - Debug.Log($"MCP-FOR-UNITY: MCPForUnityBridge started on port {currentUnityPort}."); + string platform = Application.platform.ToString(); + string serverVer = ReadInstalledServerVersionSafe(); + Debug.Log($"MCP-FOR-UNITY: MCPForUnityBridge started on port {currentUnityPort}. (OS={platform}, server={serverVer})"); Task.Run(ListenerLoop); EditorApplication.update += ProcessCommands; // Write initial heartbeat immediately @@ -727,6 +729,22 @@ namespace MCPForUnity.Editor } } + private static string ReadInstalledServerVersionSafe() + { + try + { + string serverSrc = ServerInstaller.GetServerPath(); + string verFile = Path.Combine(serverSrc, "server_version.txt"); + if (File.Exists(verFile)) + { + string v = File.ReadAllText(verFile)?.Trim(); + if (!string.IsNullOrEmpty(v)) return v; + } + } + catch { } + return "unknown"; + } + private static string ComputeProjectHash(string input) { try