- Home /
console rich text for debug.log is not working (except for \t)
I started noticing problems when I was trying to output a debug.log message over 2 lines by inserting \n. The message would just get outputted to where the \n was in the code and the rest was missing.
Next, I tried the other rich text features for log messages for color, bold, etc. None of those worked. It showed the HTML-style tags in the console output instead of applying the rich text features.
The oddest thing is that \t works to insert a tab. No other rich text features are working for console debug messages.
I'm using Unity version 2020.3.16f1 LTS.
I got it to mostly work without making any changes to code. I just saved the project in Unity and most of the console output was working, except for the \n.
Answer by MartinH8921 · Dec 23, 2021 at 07:32 AM
For some reason, without changing the code at all, the html tags are working, and \t still works, but now it still won't do a new line with \n. What I did was save the project and hit play again. I can't fathom why this would have any effect. This really seems like buggy behavior. I'm working around the new line problem by just creating another Debug.Log statement on the next line of code. I don't know if it's worth troubleshooting this irritating console output anomaly.