- Home /
How can I output a raw string \r\n?
I read a string from a file.
When I debug (debugging), I see this in a variable:
Debug output: "Hello.\r\n"
When I just simple Debug.Log or print the variable in the script, I see this in the unity console:
Debug.Log or print output: "Hello."
I don't see "\r\n".
Is it possible to output the raw string with Debug.Log or print? So, I can see "\r\n" in the unity console?
Answer by tanoshimi · May 22, 2016 at 06:23 PM
Debug.Log() and print() are the same - they print a string to the console. "\r\n" is the escape code for a carriage return + line feed - i.e. a new line on a Windows system. They're not printable characters, which is why Debug.Log won't print them.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Print statement to execute multiple times 2 Answers
Initialising List array for use in a custom Editor 1 Answer
Render Debug.Log as UI Text 2 Answers