Unity provides a great interface in the editor for watching and editing the state of game objects and components while your game is running. While this will likely be the way you can debug most of your game, you may still encounter times where logic in a script needs a finer look. Fortunately, Unity also provides an excellent set of tools to allow you to debug your scripts in the editor while your game is running. Let's look at how you might start a debugging session:
- Open Unity with an empty project.
- From the menu, select Assets | Import Package | Custom Package... and navigate to the
Chapter_10_Assets
folder in the book's downloaded source code. SelectChapter10.unitypackage
and click on Open. - The package is small, so it should import quickly. Click on the Import button on the Import Unity Package dialog to continue.
- Locate the
Main
...