private void Awake() | Hooks the input field's submit and the server and console command log streams. |
private static string ColorToHex(Color c) | Turns a colour into a #RRGGBB string. |
private void CopyBufferToOutput() | Writes the buffered log lines into the output text. |
private bool FilterOutput(LogLevel level) | True when a log level should be hidden. It casts the level number straight to a flag, so the filter flags don't match level names one to one. |
private string FormatLogMessage(string message, LogLevel level) | Wraps a message in a colour tag for its log level. |
private string GetLogColorAsHexString(LogLevel level) | Returns the hex colour for a log level. |
private void OnDestroy() | Unhooks the submit and log events. |
private void OnDisable() | Hides the keyboard and unhooks the lever and buffer events. |
private void OnEnable() | Fills the output, shows the keyboard and sets the lever to the default target. |
private void OnInputSubmitted(InputField field) | Runs the typed command on the server or client and clears the field. |
private void OnLeverSelectionChanged(SelectionLever _, int previous, int current) | Switches between client and server commands and updates the lever label. |
private void OnLog(string message, LogLevel level) | Adds a log line to the buffer, dropping old ones past the output's line limit. |
private void RunCommandOnClient(string command) | Runs a command locally through CommandService. |
private void RunCommandOnServer(string command) | Sends a command to the server through CommandSync. |
private void SetupBuffer() | Shows the current buffer and listens for new lines. |
private void SetupCommandTarget() | Hooks the lever and sets it to defaultCommandTarget. |
private void SetupKeyboard() | Shows the virtual keyboard. |
private void TeardownKeyboard() | Hides the virtual keyboard. |
private static byte ToByte(float f) | Turns a 0 to 1 colour value into a byte. |