Writing logs
You can use Unity's Debug.Log() that will output to Player.log.
There's also a Logger
class provided by Voxel Tycoon API to get nicer output:
public class MyMod : Mod
{
_logger = new Logger<MyMod>();
public void Initialize()
{
_logger.Log("Initialized!");
}
}
Output:
[1/31/2021 11:42:45 PM] [MyMod] Initialized!
Player.log¶
Player.log
is where the game writes all its logs. You can write there too using Unity's Debug.Log() in your script mods.
This file can be found in the next locations:
Platform | |
---|---|
Windows | C:\Users\username\AppData\LocalLow\CompanyName\ProductName\Player.log |
macOS | ~/Library/Logs/Company Name/Product Name/Player.log |
Linux | ~/.config/unity3d/CompanyName/ProductName/Player.log |
Last update: August 21, 2021