CoplayDev/unity-mcp

manage_menu_item execute does not run when Unity Editor is inactive

Closed this issue · 4 comments

Description

When executing a menu command (manage_menu_item execute), the action does not run if the Unity Editor is inactive. The command is only executed once the Unity Editor becomes active.

Environment:

Unity version: 6.2 (6000.2.5f1)
unity-mcp version: v3.4.0 main(6e72b33)
OS: Windows & WSL2 (Claude Code)

Notes

It is unclear whether this behavior is due to a Unity Editor setting or is caused by the implementation of unity-mcp.

Thanks @toro-ponz. I think removing the delayCall may force the editor to take focus. It might be an annoying UX, but I'll test and confirm if that works. Feel free to test as well if you have to the time to sooner.

@toro-ponz it was the delayCall as you expected. One thing to note, the actions were run for me, but just delayed (true to the function's name lol). As I mentioned it earlier removing it does bring the editor window into focus. It will be included in the next release