Game Development Reference
In-Depth Information
You will learn more about debugging and how you might use this information later in this topic.
For now, it's enough that you have successfully experimented with sample code from the
documentation.
Game development is an interactive process, including the classic method of trial and error. The
documentation is full of sample code. There will be times when the written explanation might not
make sense to you right away, but seeing the sample code in action will help clarify it. Don't be shy
about trying stuff!
A handy tip while experimenting: In Preferences ➤ Key Bindings you'll see that MonoDevelop uses
the same keyboard shortcuts of +Z for Undo and Shift+ +Z for Redo that you find in your Unity
hotkeys cheat sheet under Edit.
As you were typing your code, you may have noticed MonoDevelop trying to help you out with
autocomplete. Make your selection, press the Tab key, and MonoDevelop will fill in the rest (Figure 2-19 ).
This is useful for speed and especially accuracy by reducing the chances of pesky little error-causing typos.
Figure 2-19. MonoDevelop autocomplete pop-up suggestions
MonoDevelop also tries to help you identify errors. Introduce an error by omitting the semicolon at
the end of the line and save. In the Unity editor, you will see a warning displayed in the console, with
a helpful suggestion from Unity for fixing the error (Figure 2-20 ).
Figure 2-20. Error warning in Console panel
If you click Play anyway, Unity will insist that you fix the error (Figure 2-21 ).
 
Search WWH ::




Custom Search