using System; namespace MCPForUnity.Editor.Services { /// /// Default implementation of platform detection service /// public class PlatformService : IPlatformService { /// /// Checks if the current platform is Windows /// /// True if running on Windows public bool IsWindows() { return Environment.OSVersion.Platform == PlatformID.Win32NT; } /// /// Gets the SystemRoot environment variable (Windows-specific) /// /// SystemRoot path, or "C:\\Windows" as fallback on Windows, null on other platforms public string GetSystemRoot() { if (!IsWindows()) return null; return Environment.GetEnvironmentVariable("SystemRoot") ?? "C:\\Windows"; } } }