Skip to content

Conversation

@dsarno
Copy link
Collaborator

@dsarno dsarno commented Jan 15, 2026

Summary

  • replace GUID-based asmdef references with assembly names
  • avoid missing GUID resolution when importing as a Git package

Fixes #563

Testing

  • Unity EditMode tests (UnityMCPTests) — pass (second run; first failed due to console logs disabled)
  • Unity PlayMode tests (UnityMCPTests) — pass
  • Server pytest suite — pass

Summary by Sourcery

Enhancements:

  • Update MCPForUnity Editor and Runtime asmdef files to reference other assemblies by name instead of GUIDs to avoid GUID resolution issues.

Summary by CodeRabbit

  • Chores
    • Updated assembly dependencies to use explicit package references instead of GUID-based references for improved clarity and maintainability. The Newtonsoft.Json library is now directly referenced by name in both Editor and Runtime assembly configurations.

✏️ Tip: You can customize this high-level summary in your review settings.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 15, 2026

🧙 Sourcery has finished reviewing your pull request!


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

📝 Walkthrough

Walkthrough

Two assembly definition files updated to replace GUID-based references with named assembly references. Both MCPForUnity.Editor.asmdef and MCPForUnity.Runtime.asmdef now reference "Newtonsoft.Json" by name instead of by GUID, improving compatibility when imported as a Git package.

Changes

Cohort / File(s) Change Summary
Assembly Definition Reference Updates
MCPForUnity/Editor/MCPForUnity.Editor.asmdef, MCPForUnity/Runtime/MCPForUnity.Runtime.asmdef
Replaced GUID-based reference ("GUID:560b04d1a97f54a46a2660c3cc343a6f") with named package reference "Newtonsoft.Json" in references array (1 line changed per file)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A GUID was lost when packages roam,
Assembly names now guide us home!
Newtonsoft.Json, clear and true,
No more null refs for me or you! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Replace asmdef GUID references' directly and specifically summarizes the main change—replacing GUID-based assembly references with assembly names in asmdef files.
Linked Issues check ✅ Passed The PR fully addresses issue #563 by replacing GUID-based references in both MCPForUnity.Editor.asmdef and MCPForUnity.Runtime.asmdef with 'Newtonsoft.Json', solving the null reference compilation issue for Git package imports.
Out of Scope Changes check ✅ Passed All changes are within scope—only two asmdef files were modified to replace GUID references with assembly names, exactly as required by issue #563.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.



📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9879626 and 16bfb4b.

📒 Files selected for processing (2)
  • MCPForUnity/Editor/MCPForUnity.Editor.asmdef
  • MCPForUnity/Runtime/MCPForUnity.Runtime.asmdef
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: msanatan
Repo: CoplayDev/unity-mcp PR: 316
File: TestProjects/UnityMCPTests/Assets/Tests/EditMode/Resources.meta:1-8
Timestamp: 2025-10-13T13:27:23.040Z
Learning: UnityMcpBridge is a legacy project kept for backwards compatibility; MCPForUnity is the only active Unity plugin project. GUID collisions between UnityMcpBridge and MCPForUnity are acceptable.
Learnt from: dsarno
Repo: CoplayDev/unity-mcp PR: 0
File: :0-0
Timestamp: 2025-09-03T16:00:55.839Z
Learning: ComponentResolver in UnityMcpBridge/Editor/Tools/ManageGameObject.cs is a nested static class within ManageGameObject, not a sibling type. The `using static MCPForUnity.Editor.Tools.ManageGameObject;` import is required to access ComponentResolver methods directly without the outer class qualifier.
📚 Learning: 2025-10-13T13:27:23.040Z
Learnt from: msanatan
Repo: CoplayDev/unity-mcp PR: 316
File: TestProjects/UnityMCPTests/Assets/Tests/EditMode/Resources.meta:1-8
Timestamp: 2025-10-13T13:27:23.040Z
Learning: UnityMcpBridge is a legacy project kept for backwards compatibility; MCPForUnity is the only active Unity plugin project. GUID collisions between UnityMcpBridge and MCPForUnity are acceptable.

Applied to files:

  • MCPForUnity/Editor/MCPForUnity.Editor.asmdef
  • MCPForUnity/Runtime/MCPForUnity.Runtime.asmdef
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review
🔇 Additional comments (2)
MCPForUnity/Editor/MCPForUnity.Editor.asmdef (1)

4-7: LGTM!

Replacing the GUID-based reference with the named assembly reference "Newtonsoft.Json" is the correct fix for Git package imports. Named references are resolved by assembly name rather than AssetDatabase GUIDs, making them portable across different import methods.

MCPForUnity/Runtime/MCPForUnity.Runtime.asmdef (1)

4-6: LGTM!

Consistent with the Editor assembly definition change—replacing the GUID reference with "Newtonsoft.Json" ensures the reference remains valid when the package is imported via Git.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@dsarno dsarno merged commit cf177b5 into CoplayDev:main Jan 15, 2026
2 checks passed
@dsarno dsarno deleted the fix/asmdef-guid-references branch January 15, 2026 16:04
vbucc added a commit to Studio-Pronto/unity-mcp that referenced this pull request Jan 19, 2026
Upstream changes (v9.0.7 → v9.0.8):
- fix: UIDocument serialization to prevent infinite loops (CoplayDev#586)
- fix: Filter isCompiling false positives in Play mode (CoplayDev#582)
- fix: search inactive objects when setActive=true (CoplayDev#581)
- fix: Add Prefab Stage support for GameObject lookup (CoplayDev#573)
- fix: Prevent infinite compilation loop in Unity 6 (CoplayDev#559)
- fix: parse and validate read_console types (CoplayDev#565)
- fix: Local HTTP server UI check (CoplayDev#556)
- fix: Claude Code HTTP Remote UV path override detection
- fix: ULF detection in Claude licensing (CoplayDev#569)
- chore: Replace asmdef GUID references (CoplayDev#564)
- docs: Streamline README for faster onboarding (CoplayDev#583)
- Many new client configurators (VSCode, Cursor, Windsurf, etc.)

Fork enhancements preserved:
- "find" instruction handler in UnityTypeConverters.cs
- MarkSceneOrPrefabDirty() helper for proper Prefab Stage support
- IsInPrefabStage() and GetPrefabStageRoot() helpers
- #main URL reference (no version tags)
- TestProjects excluded

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Asmdef's reference assemblies by GUID, causing null ref's when importing into projects.

1 participant