The Logger namespace writes messages to the in-game logs console so you can trace script execution, inspect variable values, and diagnose problems without leaving the editor. Every log call is a no-op during normal gameplay — the logger only operates when Logger.isEnabled is true, which only happens in editor mode.
Logger.isEnabled is false during regular gameplay. Logging calls are safe to leave in your final script; they will simply be skipped at runtime outside the editor.
Variables
Logger.isEnabled
true only while the level is running inside the editor. Use this flag to guard expensive diagnostic code you never want to run in a published level.
Functions
Logger.log
Writes a message to the console with fully customizable background and foreground colors. The simplest overload accepts only a string; you can optionally pass Color values for the background and foreground, or supply a pre-built Log object.
Logger.info
Writes an informational message. The console renders it with the standard info style (white text on a neutral background).
Logger.warning
Writes a warning message. The console renders it with a yellow background so it stands out from normal output.
Logger.error
Writes an error message. The console renders it with a red background to make it immediately visible.
Log Class
Log is a builder object for rich console messages. You chain methods to compose text with mixed colors and multiple lines, then pass the finished object to any Logger function.
Constructors
Properties
Methods
All builder methods return the same Log instance so you can chain calls.
Usage Examples
Basic diagnostic logging
Warning and error levels
Rich multi-color log with Log builder
Custom log colors