#Easy to reach Player Log after crash
5 messages · Page 1 of 1 (latest)
If you want to reach the Player Log by the Unity Mod Kit in an easy way, do the following:
- open the script
Packages\com.channel3.foundrymodkit\Scripts\ModKitEditorWindow.cs - go to the line where it says
if (GUILayout.Button("Launch Workshop Uploader")) - between the closing bracket below (
}) andGUILayout.Space(10);enter the following code:
if (GUILayout.Button("Open Player Log..."))
{
string playerLog = Path.Combine(
Environment.GetFolderPath(
Environment.SpecialFolder.UserProfile),
"AppData", "LocalLow",
"Channel 3 Entertainment\\Foundry\\Player.Log"
);
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(playerLog));
}
If it looks like in the screenshot, save it and enjoy your new shortcut 
If you use the Harmony Log class, you can directly access the created log with this code snippet (just append it to the code where you added the Player Log button):
if (GUILayout.Button("Open Harmony Log..."))
{
string harmonyLog = Path.Combine(
Environment.GetFolderPath(
Environment.SpecialFolder.Desktop),
"harmony.log.txt"
);
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(harmonyLog));
}
Full files with some other neat additions:
- Every mod now has a separate Quickstart button in the Mod Kit GUI
- Global Quickstart button (remembers the last mod you built, even when closing the Unity Editor)