chore(unity): 固定Unity CLI Loop本地包并移除UnitySkills依赖

This commit is contained in:
Liubing\LB
2026-09-28 18:14:59 +08:00
parent 0eb43b2b40
commit c4ae02def9
952 changed files with 70137 additions and 11 deletions

View File

@@ -0,0 +1,10 @@
namespace io.github.hatayama.uLoopMCP
{
public class ControlPlayModeResponse : BaseToolResponse
{
public bool IsPlaying { get; set; }
public bool IsPaused { get; set; }
public string Message { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 752e3f7c18a5649d8b6a555add78f1d7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using System.ComponentModel;
namespace io.github.hatayama.uLoopMCP
{
public enum PlayModeAction
{
Play = 0,
Stop = 1,
Pause = 2
}
public class ControlPlayModeSchema : BaseToolSchema
{
[Description("Action to perform: Play(0) - Start play mode, Stop(1) - Stop play mode, Pause(2) - Pause play mode")]
public PlayModeAction Action { get; set; } = PlayModeAction.Play;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5634451b383ae4ff8b0a1cd00500f342
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using System.Threading;
using System.Threading.Tasks;
namespace io.github.hatayama.uLoopMCP
{
[McpTool(Description = "Control Unity Editor play mode (play/stop/pause)")]
public class ControlPlayModeTool : AbstractUnityTool<ControlPlayModeSchema, ControlPlayModeResponse>
{
public override string ToolName => "control-play-mode";
protected override async Task<ControlPlayModeResponse> ExecuteAsync(ControlPlayModeSchema parameters, CancellationToken cancellationToken)
{
ControlPlayModeUseCase useCase = new();
return await useCase.ExecuteAsync(parameters, cancellationToken);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bdce84d8140ea44e9a5fbc8b1e1cf5d6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8809b197b1dbb42fbbabc04674f5baa9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,55 @@
---
name: uloop-control-play-mode
description: "Control Unity Editor Play Mode. Use to start, stop, or pause Play Mode for runtime behavior checks and frame inspection."
---
# uloop control-play-mode
Control Unity Editor play mode (play/stop/pause).
## Usage
```bash
uloop control-play-mode [options]
```
## Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `--action` | string | `Play` | Action to perform: `Play`, `Stop`, `Pause` |
## Global Options
| Option | Description |
|--------|-------------|
| `--project-path <path>` | Optional. Use only when the target Unity project is not the current directory. |
## Examples
```bash
# Start play mode
uloop control-play-mode --action Play
# Stop play mode
uloop control-play-mode --action Stop
# Pause play mode
uloop control-play-mode --action Pause
```
## Output
Returns JSON with the current play mode state:
- `IsPlaying`: Whether Unity is currently in play mode
- `IsPaused`: Whether play mode is paused
- `Message`: Description of the action performed
## Notes
- Play action starts the game in the Unity Editor (also resumes from pause)
- Stop action exits play mode and returns to edit mode
- Pause action pauses the game while remaining in play mode
- Useful for automated testing workflows
- PlayMode entry may complete on the next editor frame. If a PlayMode-dependent command reports "PlayMode is not active" immediately after `--action Play`, wait briefly and retry.

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1e1425714444f43d1aab052bf7101893
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: