Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Before performing any code review, you **MUST** read the project constitution: [
- **Commands**: See [commands/](commands/) for utility scripts (release, tests).

## Project Conventions
- **MCP Tools**: Implemented using attributes in the Plugin. Reflection-based access via `ReflectorNet`.
- **MCP Tools**: Implemented using attributes in the Plugin; McpPlugin invokes them through `ReflectorNet` (MethodWrapper). Tool arguments and results are RQL values (`Runtime/Rql`, `Editor/Scripts/Rql`).
- **Documentation**:
- [Unity-MCP.wiki](Unity-MCP.wiki/) for user docs.
- [docs/](docs/) for translations and repo docs.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Unity-MCP-Plugin/Assets/Plugins/NuGet/Rql.Parser.dll.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Unity-MCP-Plugin/Docs/agents/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Packages/com.ivanmurzak.unity.mcp/
├── Runtime/
│ ├── UnityMcpPluginRuntime.cs # Runtime singleton (+ .Static.cs)
│ ├── Data/ # ObjectRef hierarchy, GameObjectData, etc.
│ ├── Converter/ # Json/ and Reflection/ converters
│ ├── Rql/ # RQL value layer shared with players: adapters, UnityRuntimeModule, RqlRuntime, ToolFormat/ (tool binding)
│ ├── Logger/ # UnityLogger, factory, provider
│ ├── Extensions/ # Extension methods
│ └── Utils/ # MainThread dispatcher
Expand All @@ -24,7 +24,7 @@ Packages/com.ivanmurzak.unity.mcp/
├── Tests/
│ ├── Editor/ # EditMode tests
│ └── Runtime/ # PlayMode tests
└── Plugins/ # Bundled DLLs (McpPlugin, ReflectorNet)
└── Plugins/ # Bundled DLLs (McpPlugin, ReflectorNet, Rql)
```

## Key Classes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,8 @@ static class NuGetConfig
// 8.18.0: AgentSetupKind / GetSetupKind (Claude Desktop in Cloud mode = add-as-a-Claude-connector steps).
new NuGetPackage("com.IvanMurzak.McpPlugin", "8.26.0", includeInBuild: true),
// Pinned explicitly so the resolver doesn't drift below the version
// bundled in this package. The atomic API surface (TryModifyAt,
// TryPatch, TryReadAt, View, Grep) introduced in 5.1.0 is exercised
// by the EditMode tests under Tests/Editor/AtomicApi/, which
// compile-fail against 5.0.0. 5.1.1 adds defensive try/catch around
// reflection so the documented no-throw contract on Try* methods holds.
// bundled in this package. Only McpPlugin's MethodWrapper (tool invocation,
// parameter plumbing) and its standard .NET JSON use it: tool values go through RQL.
// 5.5.0 (McpPlugin 8.11.1 depends on it) makes ReflectorNet's default MainThread recognize the
// main thread by its SynchronizationContext, not managed thread id 1. The plugin replaces
// MainThread.Instance with UnityMainThread (MainThreadDispatcher.MainThreadId), so Unity's
Expand All @@ -157,11 +154,12 @@ static class NuGetConfig
new NuGetPackage("Microsoft.Extensions.Caching.Abstractions", "8.0.0", includeInBuild: true),
new NuGetPackage("Microsoft.Extensions.Hosting.Abstractions", "8.0.1", includeInBuild: true),
new NuGetPackage("R3", "1.3.1", includeInBuild: true),
// RQL (the query language of rql-query / rql-mutate and the data layer of every tool, Editor and runtime): the
// runtime plugin's tools take and return RQL values in players too (Runtime/Rql, link.xml). Its only dependency is
// System.Text.Json 8.0.5, satisfied by the newer pin above.
new NuGetPackage("com.IvanMurzak.Rql", "0.5.0", includeInBuild: true),

// --- Editor-only dependencies (excluded from builds) ---
// RQL (the query language of rql-query / rql-mutate and the tools' data layer): Editor-only, so it never
// reaches player builds. Its only dependency is System.Text.Json 8.0.5, satisfied by the newer pin above.
new NuGetPackage("com.IvanMurzak.Rql", "0.5.0"),
new NuGetPackage("Microsoft.Bcl.Memory", "10.0.14"),
// Pinned to 4.8.0 so transitive System.Collections.Immutable stays at 7.0.0
// (forward-compatible with Unity 6.6's built-in 8.0.0). Roslyn 4.14 requires
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ namespace com.IvanMurzak.Unity.MCP.Editor.Rql.Physics3D
{
/// <summary>
/// Optional module: lives in an assembly that only compiles when com.unity.modules.physics is enabled (asmdef
/// versionDefines + defineConstraints), so its adapters (Collider, the settings source's physics page) exist exactly when the project has 3D physics.
/// versionDefines + defineConstraints), so the settings source's physics page exists exactly when the project has 3D
/// physics. The Collider adapter is shared with players (UnityRuntimeModule).
/// </summary>
public sealed class PhysicsModule : IRqlModule
{
public int Order => 100;

public void Configure(RqlModuleContext ctx) => ctx.AddAdapter(new UnityEngine_Collider_Adapter())
.AddAdapter(new RqlProjectSettings_Physics_Adapter());
public void Configure(RqlModuleContext ctx) => ctx.AddAdapter(new RqlProjectSettings_Physics_Adapter());
}
}
Loading
Loading