lesson 16: Console View
We've learned that the Project View shows us everything we have available to put in game. The Scene View shows us everything we have in the current level. In this lesson we'll learn that the Console View shows us everything we've screwed up.
Fig. 16.1 shows the Console View.
The Console View is like an obituary for scripts. If something goes wrong with a script, you'll hear about it here. In this course we won't be working with scripts, however, but PlayMaker FSMs. In addition to allowing us revolutionary development capabilities, PlayMaker gives us revolutionary troubleshooting capabilities that, for our purposes, outdo what Console View has to offer. That being said, Console View is useful as an early warning system and deserves some familiarity. The Console View returns warning messages of varying intensity, from attention to emergency. In addition to warnings, the Console View also displays debug info and messages. Scripts can be customized to return developer-defined messages for the purposes of troubleshooting. Double-clicking an error message will take you to the offending script.
Fig. 16.2 shows the Console View Control Bar.
While working with PlayMaker you'll find that the Console View Control Bar defaults are preferable and that its options will most likely go unused. Those options, left to right are Clear, Collapse, Clear on play, Error pause, and Editor. Clear clears all messages from the Console View. Collapse eliminates repetitive messaging. Clear on Play removes all error messages upon entering Play Mode. Clear on Build does the same but during build time and its use is inadvisable. Error Pause does not pause error listing. Instead, having Error Pause enabled will cause Play Mode to Pause when an error occurs. Clicking Editor reveals a drop-down with options such as Player Logging and Editor. These have checkboxes next to them allowing you to decide whether or not you want to log errors to a text file.
Right most in the Console View Control Bar are icons representing warning messages of varying intensity; attention, alert, and emergency. Emergency level warnings must be attended to; they will prevent you from proceeding with Play Mode. They may even prevent Unity from operating! The attention, alert, and emergency buttons can be deactivated to filter out error messages of a particular type but it is probably best not to.
Finally, note that error messages also appear at the very bottom band of the Unity editor. It is important to acknowledge and rectify error messages.
We learned that the Console View returns warning messages of varying intensity and displays debug info and messages. We also learned that PlayMaker offers additional error reporting and troubleshooting functionality and that we will rely on it for most of our debugging. In the next section we'll look at PlayMaker Views and the concepts and clicks that will make all our #gamedev aspirations possible!