@akiojin/unity-mcp-server 2.16.0 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/README.md +153 -100
- package/bin/unity-mcp-server +7 -1
- package/package.json +30 -7
- package/src/core/codeIndex.js +0 -0
- package/src/core/codeIndexDb.js +0 -0
- package/src/core/config.js +47 -14
- package/src/core/indexWatcher.js +84 -15
- package/src/core/jobManager.js +178 -0
- package/src/core/projectInfo.js +21 -67
- package/src/core/server.js +15 -2
- package/src/core/unityConnection.js +0 -0
- package/src/handlers/addressables/AddressablesAnalyzeToolHandler.js +170 -0
- package/src/handlers/addressables/AddressablesBuildToolHandler.js +145 -0
- package/src/handlers/addressables/AddressablesManageToolHandler.js +266 -0
- package/src/handlers/analysis/AnalyzeSceneContentsToolHandler.js +1 -1
- package/src/handlers/analysis/FindByComponentToolHandler.js +2 -2
- package/src/handlers/analysis/GetAnimatorStateToolHandler.js +1 -1
- package/src/handlers/analysis/GetComponentValuesToolHandler.js +2 -2
- package/src/handlers/analysis/GetGameObjectDetailsToolHandler.js +1 -1
- package/src/handlers/analysis/GetInputActionsStateToolHandler.js +1 -1
- package/src/handlers/analysis/GetObjectReferencesToolHandler.js +2 -2
- package/src/handlers/asset/{AssetDatabaseToolHandler.js → AssetDatabaseManageToolHandler.js} +2 -2
- package/src/handlers/asset/{AssetDependencyToolHandler.js → AssetDependencyAnalyzeToolHandler.js} +2 -2
- package/src/handlers/asset/{AssetImportSettingsToolHandler.js → AssetImportSettingsManageToolHandler.js} +2 -2
- package/src/handlers/asset/{CreateMaterialToolHandler.js → AssetMaterialCreateToolHandler.js} +2 -2
- package/src/handlers/asset/{ModifyMaterialToolHandler.js → AssetMaterialModifyToolHandler.js} +2 -2
- package/src/handlers/asset/{CreatePrefabToolHandler.js → AssetPrefabCreateToolHandler.js} +2 -2
- package/src/handlers/asset/{ExitPrefabModeToolHandler.js → AssetPrefabExitModeToolHandler.js} +2 -2
- package/src/handlers/asset/{InstantiatePrefabToolHandler.js → AssetPrefabInstantiateToolHandler.js} +2 -2
- package/src/handlers/asset/{ModifyPrefabToolHandler.js → AssetPrefabModifyToolHandler.js} +2 -2
- package/src/handlers/asset/{OpenPrefabToolHandler.js → AssetPrefabOpenToolHandler.js} +2 -2
- package/src/handlers/asset/{SavePrefabToolHandler.js → AssetPrefabSaveToolHandler.js} +2 -2
- package/src/handlers/base/BaseToolHandler.js +0 -0
- package/src/handlers/compilation/{GetCompilationStateToolHandler.js → CompilationGetStateToolHandler.js} +2 -2
- package/src/handlers/component/{AddComponentToolHandler.js → ComponentAddToolHandler.js} +2 -2
- package/src/handlers/component/ComponentFieldSetToolHandler.js +419 -0
- package/src/handlers/component/{GetComponentTypesToolHandler.js → ComponentGetTypesToolHandler.js} +2 -2
- package/src/handlers/component/{ListComponentsToolHandler.js → ComponentListToolHandler.js} +2 -2
- package/src/handlers/component/{ModifyComponentToolHandler.js → ComponentModifyToolHandler.js} +2 -2
- package/src/handlers/component/{RemoveComponentToolHandler.js → ComponentRemoveToolHandler.js} +2 -2
- package/src/handlers/console/{ClearConsoleToolHandler.js → ConsoleClearToolHandler.js} +2 -2
- package/src/handlers/console/{ReadConsoleToolHandler.js → ConsoleReadToolHandler.js} +83 -64
- package/src/handlers/editor/{LayerManagementToolHandler.js → EditorLayersManageToolHandler.js} +2 -2
- package/src/handlers/editor/{SelectionToolHandler.js → EditorSelectionManageToolHandler.js} +2 -2
- package/src/handlers/editor/{TagManagementToolHandler.js → EditorTagsManageToolHandler.js} +2 -2
- package/src/handlers/editor/{ToolManagementToolHandler.js → EditorToolsManageToolHandler.js} +2 -2
- package/src/handlers/editor/{WindowManagementToolHandler.js → EditorWindowsManageToolHandler.js} +2 -2
- package/src/handlers/gameobject/{CreateGameObjectToolHandler.js → GameObjectCreateToolHandler.js} +3 -3
- package/src/handlers/gameobject/{DeleteGameObjectToolHandler.js → GameObjectDeleteToolHandler.js} +3 -3
- package/src/handlers/gameobject/{FindGameObjectToolHandler.js → GameObjectFindToolHandler.js} +3 -3
- package/src/handlers/gameobject/{GetHierarchyToolHandler.js → GameObjectGetHierarchyToolHandler.js} +3 -3
- package/src/handlers/gameobject/{ModifyGameObjectToolHandler.js → GameObjectModifyToolHandler.js} +3 -3
- package/src/handlers/index.js +331 -293
- package/src/handlers/input/{AddInputActionToolHandler.js → InputActionAddToolHandler.js} +2 -2
- package/src/handlers/input/{CreateActionMapToolHandler.js → InputActionMapCreateToolHandler.js} +2 -2
- package/src/handlers/input/{RemoveActionMapToolHandler.js → InputActionMapRemoveToolHandler.js} +2 -2
- package/src/handlers/input/{RemoveInputActionToolHandler.js → InputActionRemoveToolHandler.js} +2 -2
- package/src/handlers/input/{AddInputBindingToolHandler.js → InputBindingAddToolHandler.js} +2 -2
- package/src/handlers/input/{CreateCompositeBindingToolHandler.js → InputBindingCompositeCreateToolHandler.js} +2 -2
- package/src/handlers/input/{RemoveAllBindingsToolHandler.js → InputBindingRemoveAllToolHandler.js} +2 -2
- package/src/handlers/input/{RemoveInputBindingToolHandler.js → InputBindingRemoveToolHandler.js} +2 -2
- package/src/handlers/input/{ManageControlSchemesToolHandler.js → InputControlSchemesManageToolHandler.js} +2 -2
- package/src/handlers/input/{GamepadSimulationHandler.js → InputGamepadSimulateToolHandler.js} +3 -3
- package/src/handlers/input/{KeyboardSimulationHandler.js → InputKeyboardSimulateToolHandler.js} +3 -3
- package/src/handlers/input/{MouseSimulationHandler.js → InputMouseSimulateToolHandler.js} +3 -3
- package/src/handlers/input/{InputSystemHandler.js → InputSystemControlToolHandler.js} +4 -4
- package/src/handlers/input/{TouchSimulationHandler.js → InputTouchSimulateToolHandler.js} +3 -3
- package/src/handlers/menu/{ExecuteMenuItemToolHandler.js → MenuItemExecuteToolHandler.js} +2 -2
- package/src/handlers/package/PackageManagerToolHandler.js +1 -1
- package/src/handlers/package/RegistryConfigToolHandler.js +1 -1
- package/src/handlers/playmode/{GetEditorStateToolHandler.js → PlaymodeGetStateToolHandler.js} +3 -3
- package/src/handlers/playmode/{PauseToolHandler.js → PlaymodePauseToolHandler.js} +4 -4
- package/src/handlers/playmode/{PlayToolHandler.js → PlaymodePlayToolHandler.js} +4 -4
- package/src/handlers/playmode/{StopToolHandler.js → PlaymodeStopToolHandler.js} +4 -4
- package/src/handlers/playmode/{WaitForEditorStateToolHandler.js → PlaymodeWaitForStateToolHandler.js} +3 -3
- package/src/handlers/scene/GetSceneInfoToolHandler.js +1 -1
- package/src/handlers/scene/{CreateSceneToolHandler.js → SceneCreateToolHandler.js} +2 -2
- package/src/handlers/scene/{ListScenesToolHandler.js → SceneListToolHandler.js} +2 -2
- package/src/handlers/scene/{LoadSceneToolHandler.js → SceneLoadToolHandler.js} +2 -2
- package/src/handlers/scene/{SaveSceneToolHandler.js → SceneSaveToolHandler.js} +2 -2
- package/src/handlers/screenshot/{AnalyzeScreenshotToolHandler.js → ScreenshotAnalyzeToolHandler.js} +2 -2
- package/src/handlers/screenshot/{CaptureScreenshotToolHandler.js → ScreenshotCaptureToolHandler.js} +2 -2
- package/src/handlers/script/{BuildCodeIndexToolHandler.js → CodeIndexBuildToolHandler.js} +127 -17
- package/src/handlers/script/CodeIndexStatusToolHandler.js +129 -0
- package/src/handlers/script/CodeIndexUpdateToolHandler.js +234 -0
- package/src/handlers/script/{ScriptCreateClassFileToolHandler.js → ScriptCreateClassToolHandler.js} +2 -2
- package/src/handlers/script/ScriptEditSnippetToolHandler.js +272 -0
- package/src/handlers/script/ScriptEditStructuredToolHandler.js +1 -1
- package/src/handlers/script/ScriptPackagesListToolHandler.js +0 -0
- package/src/handlers/script/ScriptReadToolHandler.js +0 -0
- package/src/handlers/script/ScriptRefactorRenameToolHandler.js +0 -0
- package/src/handlers/script/ScriptRefsFindToolHandler.js +0 -0
- package/src/handlers/script/ScriptRemoveSymbolToolHandler.js +0 -0
- package/src/handlers/script/ScriptSearchToolHandler.js +0 -0
- package/src/handlers/script/ScriptSymbolFindToolHandler.js +0 -0
- package/src/handlers/script/ScriptSymbolsGetToolHandler.js +0 -0
- package/src/handlers/settings/{GetProjectSettingsToolHandler.js → SettingsGetToolHandler.js} +2 -2
- package/src/handlers/settings/{UpdateProjectSettingsToolHandler.js → SettingsUpdateToolHandler.js} +2 -2
- package/src/handlers/system/{GetCommandStatsToolHandler.js → SystemGetCommandStatsToolHandler.js} +2 -3
- package/src/handlers/system/{PingToolHandler.js → SystemPingToolHandler.js} +3 -3
- package/src/handlers/system/{RefreshAssetsToolHandler.js → SystemRefreshAssetsToolHandler.js} +3 -3
- package/src/handlers/test/{GetTestStatusToolHandler.js → TestGetStatusToolHandler.js} +2 -2
- package/src/handlers/test/{RunTestsToolHandler.js → TestRunToolHandler.js} +2 -2
- package/src/handlers/ui/{ClickUIElementToolHandler.js → UIClickElementToolHandler.js} +2 -2
- package/src/handlers/ui/{FindUIElementsToolHandler.js → UIFindElementsToolHandler.js} +2 -2
- package/src/handlers/ui/{GetUIElementStateToolHandler.js → UIGetElementStateToolHandler.js} +2 -2
- package/src/handlers/ui/{SetUIElementValueToolHandler.js → UISetElementValueToolHandler.js} +2 -2
- package/src/handlers/ui/{SimulateUIInputToolHandler.js → UISimulateInputToolHandler.js} +2 -2
- package/src/handlers/video/{CaptureVideoForToolHandler.js → VideoCaptureForToolHandler.js} +8 -8
- package/src/handlers/video/{CaptureVideoStartToolHandler.js → VideoCaptureStartToolHandler.js} +2 -2
- package/src/handlers/video/{CaptureVideoStatusToolHandler.js → VideoCaptureStatusToolHandler.js} +2 -2
- package/src/handlers/video/{CaptureVideoStopToolHandler.js → VideoCaptureStopToolHandler.js} +3 -3
- package/src/lsp/CSharpLspUtils.js +95 -14
- package/src/lsp/LspProcessManager.js +0 -0
- package/src/lsp/LspRpcClient.js +14 -0
- package/src/tools/analysis/analyzeSceneContents.js +3 -3
- package/src/tools/analysis/findByComponent.js +3 -3
- package/src/tools/analysis/getAnimatorState.js +6 -6
- package/src/tools/analysis/getComponentValues.js +3 -3
- package/src/tools/analysis/getGameObjectDetails.js +3 -3
- package/src/tools/analysis/getInputActionsState.js +4 -4
- package/src/tools/analysis/getObjectReferences.js +3 -3
- package/src/tools/input/inputActionsEditor.js +18 -18
- package/src/tools/scene/createScene.js +3 -3
- package/src/tools/scene/getSceneInfo.js +3 -3
- package/src/tools/scene/listScenes.js +3 -3
- package/src/tools/scene/loadScene.js +3 -3
- package/src/tools/scene/saveScene.js +3 -3
- package/src/tools/system/ping.js +5 -5
- package/src/tools/video/recordFor.js +2 -2
- package/src/tools/video/recordPlayMode.js +0 -0
- package/src/utils/csharpParse.js +0 -0
- package/src/utils/validators.js +0 -0
- package/src/handlers/script/ScriptIndexStatusToolHandler.js +0 -61
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
addInputActionHandler
|
|
5
5
|
} from '../../tools/input/inputActionsEditor.js';
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class InputActionAddToolHandler extends BaseToolHandler {
|
|
8
8
|
constructor(unityConnection) {
|
|
9
9
|
super(
|
|
10
10
|
addInputActionToolDefinition.name,
|
|
@@ -17,4 +17,4 @@ export class AddInputActionToolHandler extends BaseToolHandler {
|
|
|
17
17
|
async execute(args) {
|
|
18
18
|
return addInputActionHandler(this.unityConnection, args);
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
}
|
package/src/handlers/input/{CreateActionMapToolHandler.js → InputActionMapCreateToolHandler.js}
RENAMED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
createActionMapHandler
|
|
5
5
|
} from '../../tools/input/inputActionsEditor.js';
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class InputActionMapCreateToolHandler extends BaseToolHandler {
|
|
8
8
|
constructor(unityConnection) {
|
|
9
9
|
super(
|
|
10
10
|
createActionMapToolDefinition.name,
|
|
@@ -17,4 +17,4 @@ export class CreateActionMapToolHandler extends BaseToolHandler {
|
|
|
17
17
|
async execute(args) {
|
|
18
18
|
return createActionMapHandler(this.unityConnection, args);
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
}
|
package/src/handlers/input/{RemoveActionMapToolHandler.js → InputActionMapRemoveToolHandler.js}
RENAMED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
removeActionMapHandler
|
|
5
5
|
} from '../../tools/input/inputActionsEditor.js';
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class InputActionMapRemoveToolHandler extends BaseToolHandler {
|
|
8
8
|
constructor(unityConnection) {
|
|
9
9
|
super(
|
|
10
10
|
removeActionMapToolDefinition.name,
|
|
@@ -17,4 +17,4 @@ export class RemoveActionMapToolHandler extends BaseToolHandler {
|
|
|
17
17
|
async execute(args) {
|
|
18
18
|
return removeActionMapHandler(this.unityConnection, args);
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
}
|
package/src/handlers/input/{RemoveInputActionToolHandler.js → InputActionRemoveToolHandler.js}
RENAMED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
removeInputActionHandler
|
|
5
5
|
} from '../../tools/input/inputActionsEditor.js';
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class InputActionRemoveToolHandler extends BaseToolHandler {
|
|
8
8
|
constructor(unityConnection) {
|
|
9
9
|
super(
|
|
10
10
|
removeInputActionToolDefinition.name,
|
|
@@ -17,4 +17,4 @@ export class RemoveInputActionToolHandler extends BaseToolHandler {
|
|
|
17
17
|
async execute(args) {
|
|
18
18
|
return removeInputActionHandler(this.unityConnection, args);
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
addInputBindingHandler
|
|
5
5
|
} from '../../tools/input/inputActionsEditor.js';
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class InputBindingAddToolHandler extends BaseToolHandler {
|
|
8
8
|
constructor(unityConnection) {
|
|
9
9
|
super(
|
|
10
10
|
addInputBindingToolDefinition.name,
|
|
@@ -17,4 +17,4 @@ export class AddInputBindingToolHandler extends BaseToolHandler {
|
|
|
17
17
|
async execute(args) {
|
|
18
18
|
return addInputBindingHandler(this.unityConnection, args);
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
createCompositeBindingHandler
|
|
5
5
|
} from '../../tools/input/inputActionsEditor.js';
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class InputBindingCompositeCreateToolHandler extends BaseToolHandler {
|
|
8
8
|
constructor(unityConnection) {
|
|
9
9
|
super(
|
|
10
10
|
createCompositeBindingToolDefinition.name,
|
|
@@ -17,4 +17,4 @@ export class CreateCompositeBindingToolHandler extends BaseToolHandler {
|
|
|
17
17
|
async execute(args) {
|
|
18
18
|
return createCompositeBindingHandler(this.unityConnection, args);
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
}
|
package/src/handlers/input/{RemoveAllBindingsToolHandler.js → InputBindingRemoveAllToolHandler.js}
RENAMED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
removeAllBindingsHandler
|
|
5
5
|
} from '../../tools/input/inputActionsEditor.js';
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class InputBindingRemoveAllToolHandler extends BaseToolHandler {
|
|
8
8
|
constructor(unityConnection) {
|
|
9
9
|
super(
|
|
10
10
|
removeAllBindingsToolDefinition.name,
|
|
@@ -17,4 +17,4 @@ export class RemoveAllBindingsToolHandler extends BaseToolHandler {
|
|
|
17
17
|
async execute(args) {
|
|
18
18
|
return removeAllBindingsHandler(this.unityConnection, args);
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
}
|
package/src/handlers/input/{RemoveInputBindingToolHandler.js → InputBindingRemoveToolHandler.js}
RENAMED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
removeInputBindingHandler
|
|
5
5
|
} from '../../tools/input/inputActionsEditor.js';
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class InputBindingRemoveToolHandler extends BaseToolHandler {
|
|
8
8
|
constructor(unityConnection) {
|
|
9
9
|
super(
|
|
10
10
|
removeInputBindingToolDefinition.name,
|
|
@@ -17,4 +17,4 @@ export class RemoveInputBindingToolHandler extends BaseToolHandler {
|
|
|
17
17
|
async execute(args) {
|
|
18
18
|
return removeInputBindingHandler(this.unityConnection, args);
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
manageControlSchemesHandler
|
|
5
5
|
} from '../../tools/input/inputActionsEditor.js';
|
|
6
6
|
|
|
7
|
-
export class
|
|
7
|
+
export class InputControlSchemesManageToolHandler extends BaseToolHandler {
|
|
8
8
|
constructor(unityConnection) {
|
|
9
9
|
super(
|
|
10
10
|
manageControlSchemesToolDefinition.name,
|
|
@@ -17,4 +17,4 @@ export class ManageControlSchemesToolHandler extends BaseToolHandler {
|
|
|
17
17
|
async execute(args) {
|
|
18
18
|
return manageControlSchemesHandler(this.unityConnection, args);
|
|
19
19
|
}
|
|
20
|
-
}
|
|
20
|
+
}
|
package/src/handlers/input/{GamepadSimulationHandler.js → InputGamepadSimulateToolHandler.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Handler for the input_gamepad_simulate tool
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class InputGamepadSimulateToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'input_gamepad_simulate',
|
|
10
10
|
'Simulate gamepad input (buttons/sticks/triggers/dpad) with value ranges.',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
package/src/handlers/input/{KeyboardSimulationHandler.js → InputKeyboardSimulateToolHandler.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Handler for the input_keyboard_simulate tool
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class InputKeyboardSimulateToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'input_keyboard_simulate',
|
|
10
10
|
'Simulate keyboard input (press/release/type/combo) with typing speed.',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Handler for the input_mouse_simulate tool
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class InputMouseSimulateToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'input_mouse_simulate',
|
|
10
10
|
'Simulate mouse input (move/click/drag/scroll) with absolute/relative coords.',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Handler for the input_system_control tool
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class InputSystemControlToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'input_system_control',
|
|
10
10
|
'Main handler for Input System operations',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
|
@@ -77,4 +77,4 @@ export class InputSystemHandler extends BaseToolHandler {
|
|
|
77
77
|
const result = await this.unityConnection.sendCommand(command, parameters);
|
|
78
78
|
return result;
|
|
79
79
|
}
|
|
80
|
-
}
|
|
80
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Handler for the input_touch_simulate tool
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class InputTouchSimulateToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'input_touch_simulate',
|
|
10
10
|
'Simulate touch input (tap/swipe/pinch/multi) with coordinates and timing.',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
|
@@ -3,10 +3,10 @@ import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Handler for executing Unity Editor menu items
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class MenuItemExecuteToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'menu_item_execute',
|
|
10
10
|
'Execute a Unity menu item or list available menus (with safety checks).',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
|
@@ -8,7 +8,7 @@ import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
|
8
8
|
export default class PackageManagerToolHandler extends BaseToolHandler {
|
|
9
9
|
constructor(unityConnection) {
|
|
10
10
|
super(
|
|
11
|
-
'
|
|
11
|
+
'package_manage',
|
|
12
12
|
'Manage Unity packages - search, install, remove, and list packages',
|
|
13
13
|
{
|
|
14
14
|
type: 'object',
|
|
@@ -8,7 +8,7 @@ import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
|
8
8
|
export default class RegistryConfigToolHandler extends BaseToolHandler {
|
|
9
9
|
constructor(unityConnection) {
|
|
10
10
|
super(
|
|
11
|
-
'
|
|
11
|
+
'package_registry_config',
|
|
12
12
|
'Configure package registries (OpenUPM/NuGet): list/add/remove scopes or recommend.',
|
|
13
13
|
{
|
|
14
14
|
type: 'object',
|
package/src/handlers/playmode/{GetEditorStateToolHandler.js → PlaymodeGetStateToolHandler.js}
RENAMED
|
@@ -3,11 +3,11 @@ import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Handler for getting Unity editor state
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class PlaymodeGetStateToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
10
|
-
'Get editor state
|
|
9
|
+
'playmode_get_state',
|
|
10
|
+
'Get current Unity editor state including play mode status',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
|
13
13
|
properties: {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Handler for
|
|
4
|
+
* Handler for the playmode_pause tool
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class PlaymodePauseToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
10
|
-
'
|
|
9
|
+
'playmode_pause',
|
|
10
|
+
'Pause or resume Unity play mode',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
|
13
13
|
properties: {},
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Handler for
|
|
4
|
+
* Handler for the playmode_play tool
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class PlaymodePlayToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'playmode_play',
|
|
10
10
|
'Enter Play Mode.',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
|
@@ -41,7 +41,7 @@ export class PlayToolHandler extends BaseToolHandler {
|
|
|
41
41
|
const startOk = Date.now();
|
|
42
42
|
for (;;) {
|
|
43
43
|
try {
|
|
44
|
-
const state = await this.unityConnection.sendCommand('
|
|
44
|
+
const state = await this.unityConnection.sendCommand('playmode_get_state', {});
|
|
45
45
|
if (state && state.isPlaying) {
|
|
46
46
|
return { status: 'success', message: 'Entered play mode', state };
|
|
47
47
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Handler for
|
|
4
|
+
* Handler for the playmode_stop tool
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class PlaymodeStopToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'playmode_stop',
|
|
10
10
|
'Exit Play Mode and return to Edit Mode.',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
|
@@ -40,7 +40,7 @@ export class StopToolHandler extends BaseToolHandler {
|
|
|
40
40
|
const startOk = Date.now();
|
|
41
41
|
for (;;) {
|
|
42
42
|
try {
|
|
43
|
-
const state = await this.unityConnection.sendCommand('
|
|
43
|
+
const state = await this.unityConnection.sendCommand('playmode_get_state', {});
|
|
44
44
|
if (state && !state.isPlaying) {
|
|
45
45
|
return { status: 'success', message: 'Exited play mode', state };
|
|
46
46
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
2
2
|
|
|
3
|
-
export class
|
|
3
|
+
export class PlaymodeWaitForStateToolHandler extends BaseToolHandler {
|
|
4
4
|
constructor(unityConnection) {
|
|
5
5
|
super(
|
|
6
|
-
'
|
|
6
|
+
'playmode_wait_for_state',
|
|
7
7
|
'Wait until the Unity editor reaches the requested state (e.g., isPlaying).',
|
|
8
8
|
{
|
|
9
9
|
type: 'object',
|
|
@@ -29,7 +29,7 @@ export class WaitForEditorStateToolHandler extends BaseToolHandler {
|
|
|
29
29
|
try { await this.unityConnection.connect(); } catch {}
|
|
30
30
|
}
|
|
31
31
|
try {
|
|
32
|
-
const state = await this.unityConnection.sendCommand('
|
|
32
|
+
const state = await this.unityConnection.sendCommand('playmode_get_state', {});
|
|
33
33
|
if (!!state?.isPlaying === want) {
|
|
34
34
|
return { status: 'success', state, waitedMs: Date.now() - start };
|
|
35
35
|
}
|
|
@@ -3,10 +3,10 @@ import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Handler for creating new scenes in Unity
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class SceneCreateToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'scene_create',
|
|
10
10
|
'Create a new scene (optionally load it and add to build settings).',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
|
@@ -3,10 +3,10 @@ import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Handler for listing scenes in Unity
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class SceneListToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'scene_list',
|
|
10
10
|
'List scenes in project (filter to loaded/build scenes or by path).',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
|
@@ -3,10 +3,10 @@ import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Handler for loading scenes in Unity
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class SceneLoadToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'scene_load',
|
|
10
10
|
'Load a scene by path or name (Single/Additive).',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
|
@@ -3,10 +3,10 @@ import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Handler for saving scenes in Unity
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class SceneSaveToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'scene_save',
|
|
10
10
|
'Save current scene or save as a specified path.',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|
package/src/handlers/screenshot/{AnalyzeScreenshotToolHandler.js → ScreenshotAnalyzeToolHandler.js}
RENAMED
|
@@ -5,10 +5,10 @@ import path from 'path';
|
|
|
5
5
|
/**
|
|
6
6
|
* Handler for analyzing screenshots from Unity Editor
|
|
7
7
|
*/
|
|
8
|
-
export class
|
|
8
|
+
export class ScreenshotAnalyzeToolHandler extends BaseToolHandler {
|
|
9
9
|
constructor(unityConnection) {
|
|
10
10
|
super(
|
|
11
|
-
'
|
|
11
|
+
'screenshot_analyze',
|
|
12
12
|
'Analyze a screenshot: dimensions/colors, UI elements, and scene content (basic/ui/content/full). For LLMs, prefer basic/ui; use full only when necessary. Provide either imagePath (preferred) or base64 (not both).',
|
|
13
13
|
{
|
|
14
14
|
type: 'object',
|
package/src/handlers/screenshot/{CaptureScreenshotToolHandler.js → ScreenshotCaptureToolHandler.js}
RENAMED
|
@@ -3,10 +3,10 @@ import { BaseToolHandler } from '../base/BaseToolHandler.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Handler for capturing screenshots from Unity Editor
|
|
5
5
|
*/
|
|
6
|
-
export class
|
|
6
|
+
export class ScreenshotCaptureToolHandler extends BaseToolHandler {
|
|
7
7
|
constructor(unityConnection) {
|
|
8
8
|
super(
|
|
9
|
-
'
|
|
9
|
+
'screenshot_capture',
|
|
10
10
|
'Capture Game/Scene/Window/Explorer screenshots. Output path is fixed to <workspace>/.unity/capture/. For LLM use, prefer explorer mode (auto-framing, clarity). Use encodeAsBase64=true only for immediate analysis, and keep resolution minimal.',
|
|
11
11
|
{
|
|
12
12
|
type: 'object',
|