Skip to content

Instantly share code, notes, and snippets.

@mandarinx
Last active October 4, 2021 11:19
Show Gist options
  • Save mandarinx/9b6293de52b4f2c2c2ed30489c21bce9 to your computer and use it in GitHub Desktop.
Save mandarinx/9b6293de52b4f2c2c2ed30489c21bce9 to your computer and use it in GitHub Desktop.
Monospaced console log in Unity3D

Displaying the console log in Unity3D using a monospaced font

I'm on macOS and haven't tried this on Windows. I'm sure it's equally easy to achieve on Windows.

Open Terminal.app and type tail -f ~/Library/Logs/Unity/Editor.log to output the entire editor log to the terminal.

Optionally, you can use grep to filter out certain lines using a regular expression as filter. In this example, I only want the lines that starts with "[MEM]": tail -f ~/Library/Logs/Unity/Editor.log | grep --line-buffered '^\[MEM\]'.

Logging with a monospaced font enables you to output tables and prettify your logs with spaces and tabs, like this:

[MEM]              UIDs: 7 
[MEM]    Memories count: 7 
[MEM]   Mem data length: 48 
[MEM] Total data length: 104 
[MEM]  
[MEM] Write to stream 
[MEM]     UID: 468324474        	Length: 12 
[MEM]     UID: -1977379122      	Length: 8 
[MEM]     UID: 151182864        	Length: 8 
[MEM]     UID: -271826697       	Length: 8 
[MEM]     UID: -1454025931      	Length: 4 
[MEM]     UID: 783222516        	Length: 4 
[MEM]     UID: -1257710685      	Length: 4 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment