/
CyberSys
/
unity-mcp-bridge
Обзор
Документация
Войти
/
CyberSys
/
unity-mcp-bridge
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
MCPForUnity/Editor/Services/PlatformService.cs
31 строка
936 B
Marcus Sanatan
Remove old UI and do lots of cleanup (#340)
24 окт 2025, 07:50
Не верифицирован
24 окт 2025, 07:50
bbf6cac
Код
Авторство
О чём код?
using System; namespace MCPForUnity.Editor.Services { /// <summary> /// Default implementation of platform detection service /// </summary> public class PlatformService : IPlatformService { /// <summary> /// Checks if the current platform is Windows /// </summary> /// <returns>True if running on Windows</returns> public bool IsWindows() { return Environment.OSVersion.Platform == PlatformID.Win32NT; } /// <summary> /// Gets the SystemRoot environment variable (Windows-specific) /// </summary> /// <returns>SystemRoot path, or "C:\\Windows" as fallback on Windows, null on other platforms</returns> public string GetSystemRoot() { if (!IsWindows()) return null; return Environment.GetEnvironmentVariable("SystemRoot") ?? "C:\\Windows"; } } }