Documentation for internal features of the Terminal. For documentation on how to register commands, please refer to the README.
Description | |
---|---|
Buffer | Handles incoming logs |
Autocomplete | Keeps a list of known words and uses it to autocomplete text |
Shell | Responsible for parsing and executing commands |
History | Keeps a list of issued commands and can traverse through that list |
Terminal.Shell.SetVariable("level", SceneManager.GetActiveScene().name);
In the console:
> print $level
Main
> set greet Hello World!
> print $greet
Hello World!
> set
LEVEL : Main
GREET : Hello World!
Terminal.Autocomplete.Register("foo");
Terminal.Shell.RunCommand("print Hello World!"));
Terminal.Log("Value of foo: {0}", foo);
Terminal.Buffer.Clear();
Terminal.History.Clear(); // Clear history
Terminal.History.Push("foo"); // Add item to history
string a = Terminal.History.Next(); // Get next item
string b = Terminal.History.Previous(); // Get previous item