统一调试
收藏

At the current moment, what I'm doing is that I'm opening Unity, double click on one of those scripts I've written, then MonoDevelop gets opened, now I have to close unity and in MonoDevelop I do Run >> Run with >> Unity Debugger.

After this Unity gets opened and when I press the play button in unity the debugging session starts. But once only. If I stop this session in either Unity or MonoDevelop I have to repeat this whole procedure all over again, which is very tedious. I have to open Unity, close Unity, (I have to close it because next step which is Run >> Run with >> Unity Debugger will open unity and if unity is already opened I'm getting error saying that only one instance of unity can open one project at a time).

我要问的是: 有没有更好的工作流程可以使我摆脱这种打开和关闭Unity的繁琐工作,并且每次停止调试会话时,只要不进行这些繁琐的重复操作,我就可以正常启动? 谢谢。

最佳答案

在MonoDevelop的调试菜单中使用“附加”;您应该能够以这种方式附加到正在运行的Unity进程。 (您可能需要确保在Unity的首选项中启用了适当的选项)。

    公众号
    关注公众号订阅更多技术干货!