November 2019
Intermediate to advanced
404 pages
12h 9m
English
We can add rich text tags to debug strings. Tags such as <size>, <b> (bold), <i> (italics), and <color> work on debug strings. This can help us differentiate between the different kinds of log messages and allows us to highlight specific elements, as follows:
Debug.Log ("<color=red>[ERROR]</color>This is a <i>very</i> <size=14><b>specific</b></size> kind of log message");
The error message we will obtain is as shown as follows:
The MonoBehaviour class has a print() method for convenience, which does the same thing as Debug.Log().
It can help to create a custom logger class, which automatically appends \n\n to the end of every log ...
Read now
Unlock full access