A simple Unity console replacement with a command line.
The terminal can output anything sent to Application.logMessageReceived
. So regular Unity logs appear if you enable them.
- Compilation errors are preserved like the Unity Console and can be double clicked to goto line.
- Stacktraces are supported with links
A command can be created by adding the [Command]
attribute to any static method with a single string[]
parameter.
[Command("help")]
public static void Help(string[] args)
{
Log.Print("------------------------");
Log.Print("Welcome to the terminal!");
Log.Print("------------------------");
Log.Print("");
Log.Print("You can trigger commands defined in c# with a [Command] attribute.");
Log.Print("Commands must be static and have a string[] parameter.");
Log.Print("");
Log.Print("To view a list of all commands, enter 'commands'");
}
The Log.Print
function is included to help style your command output nicely instead of using Debug.Log
The terminal settings can be accessed by right clicking anywhere inside the window.
- Light mode unsupported
- Package stacktraces untested
- Command auto fill / breadcrumbs