Skip to main content
Glama
PlatformService.cs936 B
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"; } } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CoplayDev/unity-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server