Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 1.33 KB

File metadata and controls

37 lines (31 loc) · 1.33 KB

Terminal

A simple Unity console replacement with a command line. term_pic_1

Console Replacement

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

Commands

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

Settings

The terminal settings can be accessed by right clicking anywhere inside the window.


TODO

  • Light mode unsupported
  • Package stacktraces untested
  • Command auto fill / breadcrumbs