extends Node ## Writes messages about what the game is doing, for finding problems. ## ## Registered as the [code]GameLog[/code] autoload. Use [method debug] instead of ## [code]print()[/code]: the messages show in debug builds and the editor, and are left ## out of released games. Problems the player may notice go through [method warning]. ## Prints [param parts] joined together, like [code]print()[/code], in debug builds only. func debug(...parts: Array) -> void: if OS.is_debug_build(): print(_join(parts)) ## Reports a problem in the editor's debugger and the console, in every build. func warning(...parts: Array) -> void: push_warning(_join(parts)) func _join(parts: Array) -> String: return "".join(parts.map(func(part: Variant) -> String: return str(part)))