Skip to content

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:

1
2
3
4
5
6
7
8
9
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 %appdata%/../LocalLow/VoxelTycoon/VoxelTycoon/Player.log
macOS ~/Library/Logs/VoxelTycoon/VoxelTycoon/Player.log
Linux ~/.config/unity3d/VoxelTycoon/VoxelTycoon/Player.log

Last update: July 26, 2023