You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> To save space in the context window, outputs of successful and skipped tests are not included in the response.
58
+
53
59
**Error Response**
54
60
55
61
| Field | Type | Description |
56
62
|----------------|---------|----------------|
57
63
|`success`| boolean | Always `false`|
58
64
|`errorMessage`| string | Error details |
59
65
60
-
> [!TIP]\
61
-
> You can also run Play Mode tests that involve the domain reloading.
62
-
63
-
> [!TIP]\
64
-
> To save space in the context window, outputs of successful and skipped tests are not included in the response.
65
-
66
66
### Run editor script
67
67
68
-
The `run_method_in_unity` tool invokes a static method in Unity Editor via reflection.
69
-
You can use this tool to edit scenes and prefabs.
70
-
68
+
The `run_method_in_unity` tool invokes a static method on Unity Editor via reflection.
71
69
Console logs during the method will be captured and returned in the `logs` field of the response.
72
70
71
+
> [!TIP]\
72
+
> You can use this tool to edit scene and prefab files.
73
+
73
74
**Parameters**
74
75
75
76
| Name | Required | Description |
@@ -87,19 +88,19 @@ The method must be **static and parameterless**.
87
88
|`success`| boolean | Always `true` (indicates reflection succeeded; does not mean the method executed without errors — internal exceptions are captured in `logs`) |
88
89
|`logs`| array | Console log entries captured during execution (may be empty). Each entry has `type` (`"Message"`, `"Warning"`, `"Error"`), `message`, and `stackTrace`. |
89
90
91
+
> [!IMPORTANT]\
92
+
> The method's return value is **NOT** returned. `success` only indicates whether the method was found and invoked (reflection succeeded). Even if the method throws internally, `success` may be `true` — the exception is captured in the `logs` field.
93
+
94
+
> [!IMPORTANT]\
95
+
> Async methods can be invoked, but the tool does not await their completion. Logs generated after return to the caller will not be included in the response.
96
+
90
97
**Error Response**
91
98
92
99
| Field | Type | Description |
93
100
|----------------|---------|----------------|
94
101
|`success`| boolean | Always `false`|
95
102
|`errorMessage`| string | Error details |
96
103
97
-
> [!IMPORTANT]\
98
-
> The method's return value is **NOT** returned. `success` only indicates whether the method was found and invoked (reflection succeeded). Even if the method throws internally, `success` may be `true` — the exception is captured in the `logs` field.
99
-
100
-
> [!IMPORTANT]\
101
-
> Async methods can be invoked, but the tool does not await their completion. Logs generated after the method returns to the caller will not be included in the response.
102
-
103
104
### Check compilation
104
105
105
106
The `get_unity_compilation_result` tool triggers Unity's `AssetDatabase.Refresh()` and checks if compilation succeeded.
0 commit comments