Reputation: 51059
How to print plain text in Unity + Visual Studio?
Printing to console with
Debug.Log()
prints with decorations. I need just plain text.
Upvotes: 0
Views: 309
Reputation: 125315
Debug.Log is not just displaying the log in the Console tab. It is also saving to a file.
If using the Editor, you can find this log file at:
Windows:
C:\Users\<username>\AppData\Local\Unity\Editor\
MacOs:
~/Library/Logs/Unity/Editor.log
When you build it, you can find the log file at:
Windows:
C:\Users\<username>\AppData\LocalLow\<CompanyName>\<ProductName>\output_log.txt
MacOs:
~/Library/Logs/Unity/Player.log
Linux:
~/.config/unity3d/<CompanyName>/<ProductName>/Player.log
Universal Windows Platform:
Desktop - %USERPROFILE%\AppData\Local\Packages<productname>\TempState\UnityPlayer.log
Windows Phone - Can be retrieved with Windows Phone Power Tools.
If that's not enough for you then you have to implement your own. Make a simple log function that saves to the end of file with any System.IO
API such as File.AppendText
.
Upvotes: 2