This chapter considered the process of debugging, which is centrally about finding and removing errors from your game. There are many methods to achieve this end, especially in Unity. Specifically, the methods considered here included the Debug.Log
statement, perhaps the simplest of all debugging methods. Using this technique, Debug.Log
statements are inserted into your code in critical lines, and these print diagnostic messages to Unity's Console. Next, we looked at is custom defines: using them, you can section off and isolate blocks of your code between the release and debug versions; this allows you to run debug-specific code when specific flags are enabled. Then, we looked at error logging. This chapter demonstrated how to create an error logger class that integrates with native Unity's application class, using delegates. We also saw the profiler; the Unity profiler is a pro-only feature that gives us a high-level statistical insight into how processing is distributed over time...
Mastering Unity Scripting
By :
Mastering Unity Scripting
By:
Overview of this book
Table of Contents (17 chapters)
Mastering Unity Scripting
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Unity C# Refresher
Debugging
Singletons, Statics, GameObjects, and the World
Event-driven Programming
Cameras, Rendering, and Scenes
Working with Mono
Artificial Intelligence
Customizing the Unity Editor
Working with Textures, Models, and 2D
Source Control and Other Tips
Index
Customer Reviews