Skip to content

Commit 6cb77d6

Browse files
committed
fix: standardize test mode values to match Unity's naming convention
- Changed default mode from "edit" to "EditMode" in C# code - Updated Python tool to use "EditMode" and "PlayMode" instead of lowercase variants
1 parent 0c60d1a commit 6cb77d6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

MCPForUnity/Editor/Tools/RunTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static async Task<object> HandleCommand(JObject @params)
2020
string modeStr = @params?["mode"]?.ToString();
2121
if (string.IsNullOrWhiteSpace(modeStr))
2222
{
23-
modeStr = "edit";
23+
modeStr = "EditMode";
2424
}
2525

2626
if (!ModeParser.TryParse(modeStr, out var parsedMode, out var parseError))

MCPForUnity/UnityMcpServer~/src/tools/run_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ class RunTestsResponse(MCPResponse):
4141
@mcp_for_unity_tool(description="Runs Unity tests for the specified mode")
4242
async def run_tests(
4343
ctx: Context,
44-
mode: Annotated[Literal["edit", "play"], Field(
45-
description="Unity test mode to run")] = "edit",
44+
mode: Annotated[Literal["EditMode", "PlayMode"], Field(
45+
description="Unity test mode to run")] = "EditMode",
4646
timeout_seconds: Annotated[str, Field(
4747
description="Optional timeout in seconds for the Unity test run (string, e.g. '30')")] | None = None,
4848
) -> RunTestsResponse:

0 commit comments

Comments
 (0)