chore(unity): 固定Unity CLI Loop本地包并移除UnitySkills依赖

This commit is contained in:
Liubing\LB
2026-09-28 18:14:59 +08:00
parent 0eb43b2b40
commit c4ae02def9
952 changed files with 70137 additions and 11 deletions

View File

@@ -0,0 +1,27 @@
using System.ComponentModel;
using System.Diagnostics;
namespace io.github.hatayama.uLoopMCP
{
public static class ProcessStartHelper
{
// NativeErrorCode 2 (ERROR_FILE_NOT_FOUND) and 3 (ERROR_PATH_NOT_FOUND) on Windows
// map to ENOENT on POSIX; other Win32Exception causes (e.g. permission denied) should
// propagate so callers fail fast instead of silently treating them as "not installed".
private const int ERROR_FILE_NOT_FOUND = 2;
private const int ERROR_PATH_NOT_FOUND = 3;
public static Process TryStart(ProcessStartInfo startInfo)
{
try
{
return Process.Start(startInfo);
}
catch (Win32Exception ex) when (ex.NativeErrorCode == ERROR_FILE_NOT_FOUND
|| ex.NativeErrorCode == ERROR_PATH_NOT_FOUND)
{
return null;
}
}
}
}