Advanced Reflection usage with LLM - Update 0.10.0
#166
IvanMurzak
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Unity-MCP: Reflection, LLMs, and Custom ReflectionConverters
This post introduces the powerful new features around JSON schema, reflection, and extensibility in Unity-MCP, as updated by PR #159.
🚀 Reflection + LLM: Supercharging Unity and C#
Unity-MCP now leverages .NET Reflection to create a flexible bridge between Large Language Models (LLMs) and Unity/C# projects. This unlocks a new level of automation, extensibility, and AI-driven manipulation for your Unity scenes and C# objects.
What Can You Do with Reflection & LLM?
🧩 Custom ReflectionConverters: Like JsonConverters, but for Reflection
Just as
JsonConverter
lets you control JSON serialization, ReflectionConverter gives you full control over how reflection-based reads and writes are handled for specific types.Why Use ReflectionConverters?
How to Create a Custom ReflectionConverter
Implement your own converter following the provided interface, much like you would with a custom JsonConverter. Register it with the MCP plugin, and it will be used automatically where appropriate.
🧠 Example: LLM-Driven API Calls in Unity
With this system, an LLM can:
⚡️ What's New in PR #159?
NoLightmap.unity
scene.GameObject.DestroyComponents
andGameObject.Modify
for better type clarity and error messages..meta
file handling.Details and file changes:
👉 PR #159 File Changes
🌱 Contribute
Anyone can create and register their own ReflectionConverters. Whether you want to handle a new Unity type or add advanced logic, just implement a new converter and plug it in.
💬 Questions?
See the Unity-MCP Discussions or open a conversation or simply reply in comments!
Beta Was this translation helpful? Give feedback.
All reactions