Skip to content

Commit 71b15d1

Browse files
committed
Format code
1 parent 22e4258 commit 71b15d1

File tree

9 files changed

+114
-114
lines changed

9 files changed

+114
-114
lines changed

UnityMcpBridge/Editor/Dependencies/DependencyManager.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public static string GetMissingDependenciesSummary()
105105
{
106106
var result = CheckAllDependencies();
107107
var missing = result.GetMissingRequired();
108-
108+
109109
if (missing.Count == 0)
110110
{
111111
return "All required dependencies are available.";
@@ -128,7 +128,7 @@ public static bool IsDependencyAvailable(string dependencyName)
128128
try
129129
{
130130
var detector = GetCurrentPlatformDetector();
131-
131+
132132
return dependencyName.ToLowerInvariant() switch
133133
{
134134
"python" => detector.DetectPython().IsAvailable,
@@ -228,7 +228,7 @@ public static string GetDependencyDiagnostics()
228228
{
229229
var result = CheckAllDependencies();
230230
var detector = GetCurrentPlatformDetector();
231-
231+
232232
var diagnostics = new System.Text.StringBuilder();
233233
diagnostics.AppendLine($"Platform: {detector.PlatformName}");
234234
diagnostics.AppendLine($"Check Time: {result.CheckedAt:yyyy-MM-dd HH:mm:ss} UTC");
@@ -240,19 +240,19 @@ public static string GetDependencyDiagnostics()
240240
diagnostics.AppendLine($"=== {dep.Name} ===");
241241
diagnostics.AppendLine($"Available: {dep.IsAvailable}");
242242
diagnostics.AppendLine($"Required: {dep.IsRequired}");
243-
243+
244244
if (!string.IsNullOrEmpty(dep.Version))
245245
diagnostics.AppendLine($"Version: {dep.Version}");
246-
246+
247247
if (!string.IsNullOrEmpty(dep.Path))
248248
diagnostics.AppendLine($"Path: {dep.Path}");
249-
249+
250250
if (!string.IsNullOrEmpty(dep.Details))
251251
diagnostics.AppendLine($"Details: {dep.Details}");
252-
252+
253253
if (!string.IsNullOrEmpty(dep.ErrorMessage))
254254
diagnostics.AppendLine($"Error: {dep.ErrorMessage}");
255-
255+
256256
diagnostics.AppendLine();
257257
}
258258

@@ -276,7 +276,7 @@ public static string GetDependencyDiagnostics()
276276
private static void GenerateRecommendations(DependencyCheckResult result, IPlatformDetector detector)
277277
{
278278
var missing = result.GetMissingDependencies();
279-
279+
280280
if (missing.Count == 0)
281281
{
282282
result.RecommendedActions.Add("All dependencies are available. You can start using MCP for Unity.");
@@ -305,4 +305,4 @@ private static void GenerateRecommendations(DependencyCheckResult result, IPlatf
305305
}
306306
}
307307
}
308-
}
308+
}

UnityMcpBridge/Editor/Dependencies/Models/DependencyCheckResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ public void GenerateSummary()
9393
}
9494
}
9595
}
96-
}
96+
}

UnityMcpBridge/Editor/Dependencies/Models/DependencyStatus.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ public override string ToString()
6262
return $"{status} {Name}{version}";
6363
}
6464
}
65-
}
65+
}

UnityMcpBridge/Editor/Dependencies/PlatformDetectors/IPlatformDetector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ public interface IPlatformDetector
4747
/// </summary>
4848
string GetUVInstallUrl();
4949
}
50-
}
50+
}

UnityMcpBridge/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public DependencyStatus DetectPython()
4949
}
5050

5151
// Try PATH resolution using 'which' command
52-
if (TryFindInPath("python3", out string pathResult) ||
52+
if (TryFindInPath("python3", out string pathResult) ||
5353
TryFindInPath("python", out pathResult))
5454
{
5555
if (TryValidatePython(pathResult, out string version, out string fullPath))
@@ -121,14 +121,14 @@ public DependencyStatus DetectMCPServer()
121121
{
122122
status.IsAvailable = true;
123123
status.Path = serverPath;
124-
124+
125125
// Try to get version
126126
string versionFile = Path.Combine(serverPath, "server_version.txt");
127127
if (File.Exists(versionFile))
128128
{
129129
status.Version = File.ReadAllText(versionFile).Trim();
130130
}
131-
131+
132132
status.Details = $"MCP Server found at {serverPath}";
133133
}
134134
else
@@ -211,7 +211,7 @@ private bool TryValidatePython(string pythonPath, out string version, out string
211211
"/snap/bin",
212212
Path.Combine(homeDir, ".local", "bin")
213213
};
214-
214+
215215
string currentPath = Environment.GetEnvironmentVariable("PATH") ?? "";
216216
psi.EnvironmentVariables["PATH"] = string.Join(":", pathAdditions) + ":" + currentPath;
217217

@@ -225,7 +225,7 @@ private bool TryValidatePython(string pythonPath, out string version, out string
225225
{
226226
version = output.Substring(7); // Remove "Python " prefix
227227
fullPath = pythonPath;
228-
228+
229229
// Validate minimum version (3.10+)
230230
if (TryParseVersion(version, out var major, out var minor))
231231
{
@@ -303,7 +303,7 @@ private bool TryFindInPath(string executable, out string fullPath)
303303
"/snap/bin",
304304
Path.Combine(homeDir, ".local", "bin")
305305
};
306-
306+
307307
string currentPath = Environment.GetEnvironmentVariable("PATH") ?? "";
308308
psi.EnvironmentVariables["PATH"] = string.Join(":", pathAdditions) + ":" + currentPath;
309309

@@ -348,4 +348,4 @@ private bool TryParseVersion(string version, out int major, out int minor)
348348
return false;
349349
}
350350
}
351-
}
351+
}

UnityMcpBridge/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public DependencyStatus DetectPython()
5252
}
5353

5454
// Try PATH resolution using 'which' command
55-
if (TryFindInPath("python3", out string pathResult) ||
55+
if (TryFindInPath("python3", out string pathResult) ||
5656
TryFindInPath("python", out pathResult))
5757
{
5858
if (TryValidatePython(pathResult, out string version, out string fullPath))
@@ -124,14 +124,14 @@ public DependencyStatus DetectMCPServer()
124124
{
125125
status.IsAvailable = true;
126126
status.Path = serverPath;
127-
127+
128128
// Try to get version
129129
string versionFile = Path.Combine(serverPath, "server_version.txt");
130130
if (File.Exists(versionFile))
131131
{
132132
status.Version = File.ReadAllText(versionFile).Trim();
133133
}
134-
134+
135135
status.Details = $"MCP Server found at {serverPath}";
136136
}
137137
else
@@ -211,7 +211,7 @@ private bool TryValidatePython(string pythonPath, out string version, out string
211211
"/usr/bin",
212212
Path.Combine(homeDir, ".local", "bin")
213213
};
214-
214+
215215
string currentPath = Environment.GetEnvironmentVariable("PATH") ?? "";
216216
psi.EnvironmentVariables["PATH"] = string.Join(":", pathAdditions) + ":" + currentPath;
217217

@@ -225,7 +225,7 @@ private bool TryValidatePython(string pythonPath, out string version, out string
225225
{
226226
version = output.Substring(7); // Remove "Python " prefix
227227
fullPath = pythonPath;
228-
228+
229229
// Validate minimum version (3.10+)
230230
if (TryParseVersion(version, out var major, out var minor))
231231
{
@@ -303,7 +303,7 @@ private bool TryFindInPath(string executable, out string fullPath)
303303
"/bin",
304304
Path.Combine(homeDir, ".local", "bin")
305305
};
306-
306+
307307
string currentPath = Environment.GetEnvironmentVariable("PATH") ?? "";
308308
psi.EnvironmentVariables["PATH"] = string.Join(":", pathAdditions) + ":" + currentPath;
309309

@@ -348,4 +348,4 @@ private bool TryParseVersion(string version, out int major, out int minor)
348348
return false;
349349
}
350350
}
351-
}
351+
}

UnityMcpBridge/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ public DependencyStatus DetectPython()
3030
{
3131
"python.exe",
3232
"python3.exe",
33-
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
33+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
3434
"Programs", "Python", "Python313", "python.exe"),
35-
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
35+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
3636
"Programs", "Python", "Python312", "python.exe"),
37-
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
37+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
3838
"Programs", "Python", "Python311", "python.exe"),
39-
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
39+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
4040
"Python313", "python.exe"),
41-
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
41+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
4242
"Python312", "python.exe")
4343
};
4444

@@ -55,7 +55,7 @@ public DependencyStatus DetectPython()
5555
}
5656

5757
// Try PATH resolution using 'where' command
58-
if (TryFindInPath("python.exe", out string pathResult) ||
58+
if (TryFindInPath("python.exe", out string pathResult) ||
5959
TryFindInPath("python3.exe", out pathResult))
6060
{
6161
if (TryValidatePython(pathResult, out string version, out string fullPath))
@@ -127,14 +127,14 @@ public DependencyStatus DetectMCPServer()
127127
{
128128
status.IsAvailable = true;
129129
status.Path = serverPath;
130-
130+
131131
// Try to get version
132132
string versionFile = Path.Combine(serverPath, "server_version.txt");
133133
if (File.Exists(versionFile))
134134
{
135135
status.Version = File.ReadAllText(versionFile).Trim();
136136
}
137-
137+
138138
status.Details = $"MCP Server found at {serverPath}";
139139
}
140140
else
@@ -213,7 +213,7 @@ private bool TryValidatePython(string pythonPath, out string version, out string
213213
{
214214
version = output.Substring(7); // Remove "Python " prefix
215215
fullPath = pythonPath;
216-
216+
217217
// Validate minimum version (3.10+)
218218
if (TryParseVersion(version, out var major, out var minor))
219219
{
@@ -327,4 +327,4 @@ private bool TryParseVersion(string version, out int major, out int minor)
327327
return false;
328328
}
329329
}
330-
}
330+
}

UnityMcpBridge/Editor/Setup/SetupWizard.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private static void CheckSetupNeeded()
4242
{
4343
// Always show setup wizard on package import
4444
McpLog.Info("Package imported - showing setup wizard", always: false);
45-
45+
4646
var dependencyResult = DependencyManager.CheckAllDependencies();
4747
EditorApplication.delayCall += () => ShowSetupWizard(dependencyResult);
4848
}
@@ -102,7 +102,7 @@ public static void ShowSetupWizardManual()
102102
public static void CheckDependencies()
103103
{
104104
var result = DependencyManager.CheckAllDependencies();
105-
105+
106106
if (!result.IsSystemReady)
107107
{
108108
bool showWizard = EditorUtility.DisplayDialog(
@@ -111,7 +111,7 @@ public static void CheckDependencies()
111111
"Open Setup Wizard",
112112
"Close"
113113
);
114-
114+
115115
if (showWizard)
116116
{
117117
ShowSetupWizard(result);
@@ -136,4 +136,4 @@ public static void OpenClientConfiguration()
136136
Windows.MCPForUnityEditorWindow.ShowWindow();
137137
}
138138
}
139-
}
139+
}

0 commit comments

Comments
 (0)