When developing your game, you’ll often use Unity’s Debug class to log messages. Sometimes, you’ll need to see those logs after your users have hit an issue to figure out what happened.
This article will explain where to find the Unity log file after an issue has occurred and present a free new tool that I developed to let you view those logs.
Alternatively, if you need to view a live log stream from your game, see my other article: How to stream Unity logs from your game.
Table of Contents:
- Windows (Win32)
- Windows (UWP)
- Mac
- Linux
- iOS
- Android
- WebGL
- Custom Log File Path
- How to view Unity log files
Where does Unity store log files?
See the official documentation on Unity log files.
Windows (Win32)
%USERPROFILE%\AppData\LocalLow\CompanyName\ProductName\Player.log
Windows (UWP)
%USERPROFILE%\AppDataLocal\Packages\ProductName\TempState\Unity\Player.log
Mac
~/Library/Logs/CompanyName/ProductName/Player.log
Linux
~/.config/unity3d/CompanyName/ProductName/Player.log
iOS
iOS builds don’t save a log file to disk. Instead, you can use Proxima Inspector to get the log stream and then save that to a file.
Android
Android builds don’t save a log file to disk. Instead, you can use adb or Proxima Inspector to get the log stream and then save that to a file.
WebGL
WebGL builds don’t save a log file to disk. However, you can easily view the logs in the browser’s Developer Tools (F12). Read more details, as well as how to get browser logs from a mobile device here.
Custom Log File Path
For Windows, Mac, and Linux you can specify the path where Unity will write the log by passing a command line argument to the game. This can let you append a timestamp and avoid overwriting old log files.
> MyGame.exe -logFile path/to/my/logfile.log
How to view Unity log files
Now that you have the log file, you can open it in any text editor, but you might notice it’s quite hard to read through, especially if you have stack traces enabled.
Fortunately, we’ve built a solution! Proxima Log Viewer is a free online tool you can use to view your logs just like the Unity editor.
Just go to https://app.unityproxima.com/logs, click Load
, and select your log file.
Proxima Log Viewer provides the same collapsing, searching, and filtering capabilities that the Unity Editor provides, and you can use it on any log file in any browser without installing Unity.
On top of that, if you enabled stack traces in your player build (see how to do that here), then you’ll also be able to see if the logged message was an error or warning.
I hope this helped you in your game development!
Further Reading
- How to Stream Unity Logs from Your Game
- Git and Unity: A Comprehensive Guide to Version Control for Game Devs
Subscribe to our Newsletter
Get the latest news and updates from Virtual Maker delivered straight to your inbox.