macro_rules! godot_print {
($fmt:literal $(, $args:expr)* $(,)?) => { ... };
}
Expand description
Prints to the Godot console.
Automatically appends a newline character at the end of the message.
Used exactly like standard println!
:
use godot::global::godot_print;
let version = 4;
godot_print!("Hello, Godot {version}!");
ยงSee also
godot_print_rich!
for a slower alternative that supports BBCode, color and URL tags.
To print Godot errors and warnings, use godot_error!
and godot_warn!
, respectively.
This uses the underlying global::print()
function, which takes a variable-length slice of variants.
Godot equivalent: @GlobalScope.print()
.