Commit Graph

21 Commits (757edbc5a4eec53757226afe3cc80e53decd7d42)

Author SHA1 Message Date
Shutong Wu 757edbc5a4
Merge pull request #93 from dsarno/feature/generalize-getcomponentdata
Feature: 🔍 Enhanced Component Data Reading via Serialization
2025-07-25 14:38:30 +08:00
Scriptwonder 46d7271e3d Update ManageGameObject.cs
Update with added comments
2025-07-25 02:32:19 -04:00
Scriptwonder 37db670427 Fix missing closing brace in SetComponentPropertiesInternal method 2025-07-25 02:27:20 -04:00
Scriptwonder 9101105212 Code Validation Update
1. Update the code validation feature. With Roslyn installed(see guide), MCP clients will receive detailed error messages and making the code generation process more error-proof
2. Minor update to the EditorWindow, making more space for upcoming features
3. Readme update to include Code validation guides
4. Minor bug fixes including installation bugs from previous VSC PR
2025-07-23 23:31:47 -04:00
Shutong Wu 6a47945479
Merge pull request #106 from Tanichael/feature/manage-shader
Feat: Add CRUD operations for Shader files via MCP

Example Prompt: "generate a cool shader and apply it on a new cube"
2025-07-14 01:45:29 -04:00
Scriptwonder 55f7c55389 Update for ManageShader
Bug fix and error handling check for the PR. Great work and I love what I built!
2025-07-14 01:42:16 -04:00
Scriptwonder e5793a6347 Update on Readme and TODO 2025-07-13 16:06:32 -04:00
Shutong Wu fb8be3b1c5
Update ManageAsset.cs 2025-07-13 15:14:08 -04:00
Shutong Wu 558b051323
Merge pull request #131 from Sunjnn/master
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`
    }
  }
}
2025-07-13 14:45:13 -04:00
Scriptwonder 21fbac60c2 Update for PhysicsMaterial
1. Fixing to ensure both version of PhysicMaterial works, editing PhysicsMaterial properties to camelCase
2. Add example output on server
2025-07-13 14:33:06 -04:00
Scriptwonder 7b3b562c72 Update ManageAsset.cs
Silly mistake I made with a rush to fix the previous bug, will be more cautious and run through the test in the future.
2025-07-08 02:37:08 -04:00
Shutong Wu 1e8862aa4b Update ManageAsset.cs 2025-07-07 15:43:34 -04:00
Scriptwonder 85c947a34e Minor Bug Fix
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
2025-07-06 19:51:12 -04:00
亭鹤 77ed43bac5 docs: add summary for ApplyPhysicsMaterialProperties method 2025-05-22 19:48:16 +08:00
亭鹤 d1249cb281 feat: add support for creating PhysicsMaterial assets 2025-05-22 17:23:12 +08:00
toma.tanigawa d4bd504e31 Add: MCP Bridge part of shader management tool 2025-04-18 20:24:46 +09:00
David Sarno 51eb59f04f Fix(MCP): Resolve ValidTRS crash during component serialization
The Unity Editor was crashing with ValidTRS() assertions when attempting to get components from certain GameObjects like the Main Camera.

Investigation revealed the crash occurred during JSON serialization when reflection code accessed specific matrix properties (e.g., Camera.cullingMatrix, Transform.rotation, Transform.lossyScale). Accessing these properties appears to trigger internal Transform state validation failures, potentially due to interactions with the JSON serializer's reflection mechanism.

This fix addresses the issue by:

- Replacing LINQ iteration in GetComponentsFromTarget with a standard loop over a copied list to prevent potential premature serialization interactions.

- Explicitly skipping known problematic Camera matrix properties (cullingMatrix, pixelRect, rect) and generic matrix properties (worldToLocalMatrix, localToWorldMatrix) within GetComponentData's reflection logic.

- Retaining manual serialization for Transform component properties to avoid related reflection issues.
2025-04-10 12:53:01 -07:00
David Sarno dd0113d258 Refactor: Extract GameObject/Component serialization to GameObjectSerializer helper
Moved serialization logic (GetGameObjectData, GetComponentData, metadata caching, JSON conversion helpers) from ManageGameObject tool to a dedicated GameObjectSerializer class in the Helpers namespace.

This improves separation of concerns and reduces the size/complexity of ManageGameObject.cs. Updated ManageGameObject to use the new helper class.
2025-04-10 09:42:42 -07:00
David Sarno 15ba68f473 feat: Improve GameObject serialization and add includeNonPublicSerialized flag 2025-04-10 08:12:20 -07:00
David Sarno 9b11224357 Feat: Generalize GetComponentData using reflection 2025-04-09 19:58:42 -07:00
Justin Barnett cb603b7b1a restructured project
- moved Unity package and Python application into separate folders to be
downloaded separately using clone .git/UnityMcpBridge
2025-04-08 06:14:13 -04:00