Performance & Quality Improvements:
- Add shared JsonSerializer to eliminate per-call allocation overhead
- Optimize ComponentResolver with CacheByName for short-name lookups
- Deduplicate Vector3 parsing implementations to reduce maintenance burden
- Improve property name normalization for better fuzzy matching quality
- Reduce log noise by avoiding duplicate component resolution warnings
Code Quality:
- Keep using static import for ComponentResolver (CodeRabbit was incorrect about this)
- Normalize property names consistently in AI suggestions algorithm
- Remove duplicate ParseVector3 implementation
TestAsmdef Fix:
- Revert TestAsmdef back to runtime-compatible (remove "includePlatforms": ["Editor"])
- CustomComponent now works correctly for asmdef testing as originally intended
- Validates that ComponentResolver properly handles both short and FQN for asmdef components
Live Testing Validation:
- All ComponentResolver functionality verified through live MCP connection
- AI property matching working perfectly with natural language input
- Assembly definition support fully functional for both default and custom assemblies
- Error handling provides helpful suggestions and complete context
All 45 C# tests + 31 Python tests still passing. Production ready!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Critical Bug Fixes:
- Fix operator precedence bug in ManageAsset.cs that could cause null reference exceptions
- Fix GameObject memory leak in primitive creation when name validation fails
- Add proper cleanup with DestroyImmediate when primitive creation fails
ComponentResolver Integration:
- Replace fragile string-based GetComponent() calls with robust ComponentResolver
- Add ComponentResolver integration in ManageAsset.cs for component lookups
- Add fallback to string-based lookup in ManageGameObject.cs for compatibility
Enhanced Error Handling:
- Surface specific ComponentResolver error context in ScriptableObject creation failures
- Add support for setting private [SerializeField] fields in property matching
- Improve debugging with detailed error messages
Assembly Definition Fixes:
- Configure TestAsmdef as Editor-only to prevent build bloat
- Add explicit TestAsmdef reference to test assembly for proper component resolution
- Fix ComponentResolverTests to use accessible CustomComponent instead of TicTacToe3D
Code Quality:
- Disable nullable reference types for legacy codebase to eliminate 100+ warnings
- Maintain backward compatibility while improving reliability
All 45 unit tests pass, ensuring no regressions while significantly improving robustness.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace Assembly.LoadFrom with already-loaded assembly search
- Prioritize Player assemblies over Editor assemblies using CompilationPipeline
- Support both short names and fully-qualified component names
- Add comprehensive caching and error handling with disambiguation
- Use Undo.AddComponent for proper editor integration
- Handle ReflectionTypeLoadException safely during type enumeration
- Add fallback to TypeCache for comprehensive type discovery in Editor
Fixes component resolution across custom assembly definitions and eliminates
"Could not load the file 'Assembly-CSharp-Editor'" errors.
Tested with:
- Built-in Unity components (Rigidbody, MeshRenderer, AudioSource)
- Custom user scripts in Assembly-CSharp (TicTacToe3D)
- Custom assembly definition components (TestNamespace.CustomComponent)
- Error handling for non-existent components
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: rename namespace from UnityMcpBridge to MCPForUnity across all files
See thread in #6, we can't use Unity MCP because it violates their trademark.
That name makes us look affiliated. We can use MCP for Unity
* Change package display name, menu item and menu titles
These are front facing so has to change for Unity asset store review
* Misc name changes in logs and comments for better consistency
* chore: update editor window title from 'MCP Editor' to 'MCP for Unity'
* refactor: update branding from UNITY-MCP to MCP-FOR-UNITY across all log messages and warnings
* chore: rename Unity MCP to MCP For Unity across all files and bump version to 2.1.2
* docs: update restore script title to clarify Unity MCP naming
* Fix usage instructions
* chore: update log messages to use MCP For Unity branding instead of UnityMCP
* Add a README inside plugin, required for distributing via the asset store
* docs: update Unity port description and fix typo in troubleshooting section
* Address Rabbit feedback
* Update Editor prefs to use new name
Prevents overlap with other Unity MCPs, happy to revert if it's too much
* refactor: rename server logger and identifier from unity-mcp-server to mcp-for-unity-server
* Standardize casing of renamed project to "MCP for Unity", as it is on the asset store
* Remove unused folder
* refactor: rename Unity MCP to MCP for Unity across codebase
* Update dangling references
* docs: update product name from UnityMCP to MCP for Unity in README
* Update log and comments for new name
Add support for creating physics material assets. Works on Unity 2022 onwards and Unity 6, since they use different naming for PhysicsMaterial(PhysicMaterial before Unity 6, and PhysicsMaterial after).
Add naming examples on the server side
TODO: currently unity-mcp only support adding gameobject and specifying adding a physic material, and manage_gameobject.cs does not handle a detailed request such as the copied request well. Will be the future work.
Example:
{
`name`: `BouncyCube`,
`action`: `create`,
`position`: [
6,
2,
0
],
`primitive_type`: `Cube`,
`components_to_add`: [
`Rigidbody`
],
`component_properties`: {
`Rigidbody`: {
`mass`: 1,
`useGravity`: true
},
`BoxCollider`: {
`material`: `Assets/Physics Materials/SuperBouncePhysicsMaterial.physicmaterial`
}
}
}
1. Solve the IDE/Unity miscommunication for the _Color and menuPath params
2. TODOs: Fix readme, look into more issues, bring back tool dev tutorial, view pull request and set a future roadmap