agentleFS
IvanMurzakIvanMurzak/Unity-MCP/.github/copilot-instructions.md

Unity-MCP

Copilot instructions4.4k starsChanged 9 months agoApache-2.0View on GitHub

PROHIBITED: Using System.Reflection to access private, internal, or otherwise non-public fields, properties, methods, or classes in project code. This includes Type.GetType, BindingFlags.NonPublic, GetMethod, GetField, GetProperty, and similar reflection APIs when used to bypass access modifiers. Example of prohibited code: Note: This rule does NOT apply to ReflectorNet library usage, which is an external dependency specifically designed for reflection-based access patterns. Before performing any code review, you MUST read the project constitution: .specify/memory/constitution.md. All code review feedback must verify adherence to…

Trending

Less talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 10 mentionsApr 2026: 3 mentionsMay 2026: 0 mentionsJun 2026: 2 mentionsJul 2026: 2 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the IvanMurzak/Unity-MCP repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about IvanMurzak/Unity-MCP

The biggest 5 of 23 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 23

Talked about on GitHub and Hacker News (23 times).

On GitHub · 22

17 more on GitHub

On Hacker News · 1

The file

We split this copilot-instructions.md into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before performing any code review, you MUST read the project constitution: .specify/memory/constitution.md.

    line 24
  2. Very specific:

    C#: Use 4 spaces indentation.

    line 27
  3. Distinctive:

    PowerShell: Use K&R brace style.

    line 30
  4. Distinctive:

    Run tests: commands/run-unity-tests.ps1.

    line 44

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Project Guidelines

Critical Rules

No C# Reflection for Private Access

PROHIBITED: Using System.Reflection to access private, internal, or otherwise non-public fields, properties, methods, or classes in project code. This includes Type.GetType, BindingFlags.NonPublic, GetMethod, GetField, GetProperty, and similar reflection APIs when used to bypass access modifiers.

Example of prohibited code:

// WRONG: Accessing internal Unity API via reflection
var logEntriesType = Type.GetType("UnityEditor.LogEntries, UnityEditor.CoreModule")
                  ?? Type.GetType("UnityEditorInternal.LogEntries, UnityEditor.CoreModule")
                  ?? Type.GetType("UnityEditor.LogEntries, UnityEditor")
                  ?? Type.GetType("UnityEditorInternal.LogEntries, UnityEditor");
logEntriesType?.GetMethod("Clear", BindingFlags.Static | BindingFlags.Public)
              ?.Invoke(null, null);

Note: This rule does NOT apply to ReflectorNet library usage, which is an external dependency specifically designed for reflection-based access patterns.

Code Review

Before performing any code review, you MUST read the project constitution: .specify/memory/constitution.md. All code review feedback must verify adherence to the principles defined in the constitution. Constitution principles supersede ad-hoc practices when conflicts arise.

Code Style

  • C#: Use 4 spaces indentation. PascalCase for classes/methods/properties, _camelCase for private readonly fields.
    • Namespace: com.IvanMurzak.Unity.MCP.
    • Example: UnityMcpPlugin.cs.
  • PowerShell: Use K&R brace style.

Architecture

  • Unity-MCP-Plugin: Main Unity package.
    • Core logic: Packages/com.ivanmurzak.unity.mcp/Runtime.
    • Editor logic: Packages/com.ivanmurzak.unity.mcp/Editor.
    • Tests: Packages/com.ivanmurzak.unity.mcp/Tests.
  • MCP Server: lives in the shared GameDev-MCP-Server repo (binary gamedev-mcp-server); the plugin downloads the release pinned by McpServerManager.ServerVersion.
  • Installer: Installer/ wraps the package installation.
  • Unity-Tests: Unity-Tests/ contains projects for different Unity versions (2022, 2023, 6000) linking locally to the Plugin.

Build and Test

  • Plugin:
    • Auto-compiles in Unity.
    • Run tests: commands/run-unity-tests.ps1.
    • Editor Tests: Packages/com.ivanmurzak.unity.mcp/Tests/Editor.
  • Server: built and released from the shared GameDev-MCP-Server repo — not from this repo.
  • Commands: See commands/ for utility scripts (release, tests).

Project Conventions

  • MCP Tools: Implemented using attributes in the Plugin. Reflection-based access via ReflectorNet.
  • Documentation:
    • Unity-MCP.wiki for user docs.
    • docs/ for translations and repo docs.
    • See CLAUDE.md in subdirectories for specific agent notes.
  • Versioning: package.json in Unity-MCP-Plugin/Packages/com.ivanmurzak.unity.mcp/package.json.

Integration Points

  • Communication: SignalR between Server and Plugin.
  • Dependencies: OpenUPM for external packages.

Security

  • Server Transport: Configurable via --client-transport (stdio or streamableHttp).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.