Skip to content

Improve Command System: Added Command Pattern and Editor Integration #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bhadrik
Copy link

@bhadrik bhadrik commented Apr 19, 2025

Summary of Changes

  • Implemented the Command Pattern for network command execution to improve scalability and maintainability of command handling.
  • Exposed all registered commands within the MCP Editor window for easier discovery and debugging.

Developer Notes

To add a new command, simply create a handler class and register the command using the CommandRegistry. This approach enables modular command management and simplifies the process of extending the command system.

Example:

[InitializeOnLoad]
public static class NewCommand
{
    static NewCommand()
    {
        CommandRegistry.RegisterCommand("new_command", HandleCommand);
    }

    public static object HandleCommand(JObject @params)
    {
        // Implement command handling logic here
    }
}

Commands pattern added for the network command execution for better command management.
@michaelnugent
Copy link

FYI I applied this PR to my fork michaelnugent/unity-mcp@5fcb545

@bhadrik
Copy link
Author

bhadrik commented May 20, 2025

I have created agent inside of Unity instead of managing MCP, check it out here.
https://github.com/bhadrik/unity-autopilot

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.

2 participants