Skip to content

Conversation

KlausUllrich
Copy link

Extended ApplyMaterialProperties to loop through all properties in the provided JObject and set them directly on the material if they match a known property (e.g., _Color, _MainTex, etc.). Now supports direct assignment of color, float, and texture properties using simple JSON structures, such as: { "_Color": [0, 1, 0, 1] } for albedo color
{ "_Glossiness": 0.5 } for smoothness
{ "_MainTex": "Assets/Textures/MyTex.png" } for textures Retained backward compatibility with the previous structured property format (color, float, texture objects). This change enables more flexible and user-friendly material creation and modification via automation and external tools. Fixes issues where material color and other properties could not be set from automation.

Extended ApplyMaterialProperties to loop through all properties in the provided JObject and set them directly on the material if they match a known property (e.g., _Color, _MainTex, etc.).
Now supports direct assignment of color, float, and texture properties using simple JSON structures, such as:
{ "_Color": [0, 1, 0, 1] } for albedo color
{ "_Glossiness": 0.5 } for smoothness
{ "_MainTex": "Assets/Textures/MyTex.png" } for textures
Retained backward compatibility with the previous structured property format (color, float, texture objects).
This change enables more flexible and user-friendly material creation and modification via automation and external tools.
Fixes issues where material color and other properties could not be set from automation.
- Modified ServerInstaller.cs to download from KlausUllrich/unity-mcp
- This ensures Unity package installs code from our fork, not original repo
- Critical for testing our audited code improvements
- Part of AWMS Unity MCP testing strategy
- Add fork identification and enhancements section
- Update installation URL to use KlausUllrich/unity-mcp
- Add note about ServerInstaller enhancement
- Include AWMS project integration information
- Add references to enhanced documentation and testing
- Acknowledge original project by justinpbarnett
…allation

- Modified ServerInstaller.GetSaveLocation() to prioritize repository path
- Eliminates double installation conflicts between Unity Bridge and Claude Desktop
- Removes AppData hardcoded path dependency
- Maintains backward compatibility with fallback to AppData
- Fixes MCP Editor server detection and port display issues
- Document installation path fix implementation
- Confirm Unity MCP Bridge and Python server status
- Outline testing requirements for material property validation
- Prepare for systematic Unity MCP tool validation
- Analyzed active Unity MCP forks: IvanMurzak, nurture-tech, CoderGamester
- Integrated justinpbarnett original roadmap priorities
- Prioritized improvements for AWMS integration
- Strategic focus: enhanced error handling, custom tools, context reduction
- Implementation phases aligned with AWMS development timeline
- Added concise session knowledge for Unity MCP issues

- Documents current problems: material properties, editor tool, testing

- References AWMS validation framework in Unity_AWMS_Test
@CoplayDev CoplayDev deleted a comment from bhadrik Jul 12, 2025
@Scriptwonder
Copy link
Collaborator

Sounds cool! I saw the doc you made and wonder what was the possible issue with properties set but not applied?

@dsarno
Copy link
Collaborator

dsarno commented Aug 12, 2025

Hi again @KlausUllrich. Not sure if you're still interested in working on this PR. If not, we'll close. If so, here are some notes:

There's a useful feature in here, but the PR mixes unrelated changes.
Please trim this into a smaller PR:
1. Feature only: keep the ManageAsset.ApplyMaterialProperties change that allows direct JSON assignment (great UX for agents/scripts). Before merge, please make it type‑safe by using shader.FindPropertyIndex + shader.GetPropertyType and routing to the correct setter (SetColor/SetVector/SetFloat/SetTexture). Also handle vector arrays and support textures by GUID in addition to project paths, plus add 2–3 editor tests.  
2. Installer: we just overhauled this so don't need it, you can leave out. And note: Upstream shouldn’t default to a personal fork or a user‑specific folder; if you want a “repository mode,” please gate it behind a user setting with existing defaults unchanged. 
3. Docs: keep the README edits minimal and focused on the new JSON format; AWMS/testbed notes can live in a discussion or your fork. 
With the above trim and the type‑safety tweaks, I’m +1 to merge the feature promptly.

@msanatan
Copy link
Contributor

Hey @KlausUllrich, I know it's been a while but we'd love to have this feature in. Let us know if you're still keen and need any further support. Great work so far!

@Scriptwonder Scriptwonder added the enhancement New feature or request label Aug 21, 2025
@KlausUllrich
Copy link
Author

Uff, hello guys, I am really sorry for my slow response times! I am still traveling and won't be back withing the next 3 weeks. If possible, can you take over? Busy times... I am sorry!

@msanatan
Copy link
Contributor

Uff, hello guys, I am really sorry for my slow response times! I am still traveling and won't be back withing the next 3 weeks. If possible, can you take over? Busy times... I am sorry!

No need to apologize! Please enjoy your travels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants