chore(logging): include OS and server version in MCP bridge start log
parent
58ed4d4e13
commit
86b4dc14bc
|
|
@ -310,7 +310,9 @@ namespace MCPForUnity.Editor
|
||||||
|
|
||||||
isRunning = true;
|
isRunning = true;
|
||||||
isAutoConnectMode = false;
|
isAutoConnectMode = false;
|
||||||
Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: MCPForUnityBridge started on port {currentUnityPort}.");
|
string platform = Application.platform.ToString();
|
||||||
|
string serverVer = ReadInstalledServerVersionSafe();
|
||||||
|
Debug.Log($"<b><color=#2EA3FF>MCP-FOR-UNITY</color></b>: MCPForUnityBridge started on port {currentUnityPort}. (OS={platform}, server={serverVer})");
|
||||||
Task.Run(ListenerLoop);
|
Task.Run(ListenerLoop);
|
||||||
EditorApplication.update += ProcessCommands;
|
EditorApplication.update += ProcessCommands;
|
||||||
// Write initial heartbeat immediately
|
// 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)
|
private static string ComputeProjectHash(string input)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue