Debugging with abstract or textual representations of data (such as Debug.Log
) is often adequate but not always optimal. Sometimes, a picture is worth a thousand words. So, for example, when coding the line-of-sight functionality for enemies and other characters that allow them to see the player and other objects whenever they come in range, it's useful to get a live and graphical representation of where the line of sight actually is in the viewport. This line of functionality is drawn in terms of lines or as a wireframe cube. Similarly, if an object is following a path, it'd be great to draw this path in the viewport that displays it as a colored line. The purpose of this is not to create visual aids that will really show in the final game but simply to ease the debugging process that lets us get a better idea of how the game is working. These kinds of helpers or gizmos are a part of visual debugging. Unity already provides us with many gizmos automatically, such as the...
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