超大量的更新 修复很多问题,gameplay特效初步
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -13,7 +13,7 @@ namespace MCPForUnity.Editor.Helpers
|
||||
{
|
||||
private const string PrefClaude = EditorPrefKeys.ClaudeCliPathOverride;
|
||||
|
||||
// Resolve Claude CLI absolute path. Pref → env → common locations → PATH.
|
||||
// Documentation text normalized.
|
||||
internal static string ResolveClaude()
|
||||
{
|
||||
try
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MCPForUnity.Editor.Tools;
|
||||
@@ -170,7 +170,7 @@ namespace MCPForUnity.Editor.Helpers
|
||||
case "_basemap": candidates = new[] { "_BaseMap", "_MainTex" }; break;
|
||||
case "_glossiness": candidates = new[] { "_Glossiness", "_Smoothness" }; break;
|
||||
case "_smoothness": candidates = new[] { "_Smoothness", "_Glossiness" }; break;
|
||||
// Friendly names → shader property names
|
||||
// Documentation text normalized.
|
||||
case "metallic": candidates = new[] { "_Metallic" }; break;
|
||||
case "smoothness": candidates = new[] { "_Smoothness", "_Glossiness" }; break;
|
||||
case "albedo": candidates = new[] { "_BaseMap", "_MainTex" }; break;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
@@ -321,10 +321,10 @@ namespace MCPForUnity.Editor.Helpers
|
||||
/// Normalizes a property name by removing separators and converting to camelCase.
|
||||
/// Handles common naming variations from LLMs and humans.
|
||||
/// Examples:
|
||||
/// "Use Gravity" → "useGravity"
|
||||
/// "is_kinematic" → "isKinematic"
|
||||
/// "max-angular-velocity" → "maxAngularVelocity"
|
||||
/// "Angular Drag" → "angularDrag"
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
/// <param name="input">The property name to normalize</param>
|
||||
/// <returns>The normalized camelCase property name</returns>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
|
||||
namespace MCPForUnity.Editor.Resources
|
||||
{
|
||||
@@ -22,8 +22,8 @@ namespace MCPForUnity.Editor.Resources
|
||||
|
||||
/// <summary>
|
||||
/// Create an MCP resource attribute with auto-generated resource name.
|
||||
/// The resource name will be derived from the class name (PascalCase → snake_case).
|
||||
/// Example: ManageAsset → manage_asset
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
public McpForUnityResourceAttribute()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -365,7 +365,7 @@ namespace MCPForUnity.Editor.Services.Transport
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
// Async command – cleanup after completion on next editor frame to preserve order.
|
||||
// Documentation text normalized.
|
||||
pending.CompletionSource.Task.ContinueWith(_ =>
|
||||
{
|
||||
EditorApplication.delayCall += () => RemovePending(id, pending);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -497,7 +497,7 @@ namespace MCPForUnity.Editor.Tools
|
||||
changed = false;
|
||||
try
|
||||
{
|
||||
// Phase 1.1: Normalize friendly path syntax (e.g., myList[5] → myList.Array.data[5])
|
||||
// Documentation text normalized.
|
||||
string normalizedPath = NormalizePropertyPath(propertyPath);
|
||||
string normalizedOp = op.Trim().ToLowerInvariant();
|
||||
|
||||
@@ -1213,10 +1213,10 @@ namespace MCPForUnity.Editor.Tools
|
||||
///
|
||||
/// <para><b>Format detection:</b></para>
|
||||
/// <list type="bullet">
|
||||
/// <item>3-element array → Interpreted as Euler angles (degrees)</item>
|
||||
/// <item>4-element array → Interpreted as raw quaternion [x, y, z, w]</item>
|
||||
/// <item>Object with euler → Uses euler array for rotation</item>
|
||||
/// <item>Object with x, y, z, w → Uses raw quaternion components</item>
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// </list>
|
||||
/// </summary>
|
||||
/// <param name="prop">The SerializedProperty of type Quaternion to set</param>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
|
||||
namespace MCPForUnity.Editor.Tools
|
||||
{
|
||||
@@ -55,8 +55,8 @@ namespace MCPForUnity.Editor.Tools
|
||||
|
||||
/// <summary>
|
||||
/// Create an MCP tool attribute with auto-generated command name.
|
||||
/// The command name will be derived from the class name (PascalCase → snake_case).
|
||||
/// Example: ManageAsset → manage_asset
|
||||
/// Documentation text normalized.
|
||||
/// Documentation text normalized.
|
||||
/// </summary>
|
||||
public McpForUnityToolAttribute()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user