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,31 @@
namespace io.github.hatayama.uLoopMCP
{
/// <summary>
/// Response schema for Ping command
/// Provides type-safe response structure
/// </summary>
public class PingResponse : BaseToolResponse
{
/// <summary>
/// The response message from Unity
/// </summary>
public string Message { get; set; }
/// <summary>
/// Create a new PingResponse
/// </summary>
/// <param name="message">Response message</param>
public PingResponse(string message)
{
Message = message;
}
/// <summary>
/// Parameterless constructor for JSON deserialization
/// </summary>
public PingResponse()
{
Message = string.Empty;
}
}
}

View File

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

View File

@@ -0,0 +1,17 @@
using System.ComponentModel;
namespace io.github.hatayama.uLoopMCP
{
/// <summary>
/// Schema for Ping command parameters
/// Provides type-safe parameter access with default values
/// </summary>
public class PingSchema : BaseToolSchema
{
/// <summary>
/// Message to send to Unity
/// </summary>
[Description("Message to send to Unity")]
public string Message { get; set; } = "Hello from TypeScript MCP Server";
}
}

View File

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

View File

@@ -0,0 +1,29 @@
using System.Threading;
using System.Threading.Tasks;
namespace io.github.hatayama.uLoopMCP
{
/// <summary>
/// Ping tool handler - Type-safe implementation using Schema and Response
/// Connection test and message echo functionality
/// </summary>
[McpTool(
DisplayDevelopmentOnly = true,
Description = "Connection test and message echo"
)]
public class PingTool : AbstractUnityTool<PingSchema, PingResponse>
{
public override string ToolName => "ping";
protected override Task<PingResponse> ExecuteAsync(PingSchema parameters, CancellationToken cancellationToken)
{
// Type-safe parameter access - no more string parsing!
string message = parameters.Message;
string response = $"Unity MCP Bridge received: {message}";
// Create type-safe response
PingResponse pingResponse = new PingResponse(response);
return Task.FromResult(pingResponse);
}
}
}

View File

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