In this tutorial, you’ll see a project configured with MonoDevelop. And how to run and debug it.
- Open the ‘Example’ project
- Choose a Script Editor
- Add breakpoint in source code
- Attach Script Editor to Unity3D
1. Open the ‘Example’ project
- Projects > Open > ‘Example’ > (wait) > Open Scene > ‘Sample Scenes Scenes/car.unity’
- Edit > Play > (test it) > Play (or click Play button, or press Ctrl+P)
2. Choose a Script Editor
- Edit > Preferences > External Tools > ExternalScriptEditor: ‘MonoDevelop’
- Assets > Open C# Project
3. Add Breakpoint in source code
- Open ‘SampleScenes/Menu/Scripts/MenuSceneLoader.cs’
- Add a breakpoint to line 14
4. Attach Script Editor to Unity3D
- Run > Attach to process > Unity3d > Attach
- Edit > Play
- (it’s in pause now, stopped at the breakpoint line)
- Run > Continue Debugging (or click Continue button or press F5)
- (play with it)
Pros: MonoDevelop is more productive than editing script in simple text editor or in Unity3d (compilation, warnings, autocomplete, etc). It’s light on CPU/RAM consumption.
Cons: Need to switch between Editor and Unity to run each debug. It’s also a little unstable (copy/paste from webbrowser sometime copy empty chars, compilation shutdown, etc).
Here is the same project opened on VisualStudio, MonoDevelop and a text Editor.