|Topic was automatically imported from the old Question2Answer platform.
Do you guys have better way to print log In Godot IDE?
Well the only thing that would come to my mind, is to use
Otherwise I would suggest the debug tool, for debugging.
Or even write your logs in a file.
coffeeDragon | 2018-05-30 07:24
It’s been two years since this was asked, but to anyone who stumbles on this question:
You can print colored text using ANSI escape characters. However you need to literally print the escape character because printing “/e” will not work. You can copy and paste the character and store it on a string.
If you are using Windows you will also need to change a system register to allow Godot to use the console ANSI interpreter:
HKEY_CURRENT_USER > Console > VirtualTerminalLevel to 0x1.
I made a plugin to help with that:
Thanks a lot for this! will make something very naughty with it
I wonder, how did you figure out what the escape character was? in the code it shows as a square, and looking it up on google gives 0 results. Godot editor don’t show it at all.
I made a GIF to ANSI terminal viewer in PHP once and it was easier than this
I’m on Linux btw not Windows
rehhouari | 2021-05-08 21:48
GD.PrintRich (or print_rich in GDScript) accepts BBCode, which allows you to add a [color] tag.