void OnEnable() { Buffer = new CommandLog(BufferSize); Shell = new CommandShell(); History = new CommandHistory(); Autocomplete = new CommandAutocomplete(); // Hook Unity log events Application.logMessageReceived += HandleUnityLog; }
public void Awake() { Buffer = new CommandLog(BufferSize); Shell = new CommandShell(); History = new CommandHistory(); Autocomplete = new CommandAutocomplete(); command_text = ""; Shell.RegisterCommands(); if (IssuedError) { Log(TerminalLogType.Error, "Error: {0}", Shell.IssuedErrorMessage); } foreach (var command in Shell.Commands) { Autocomplete.Register(command.Key); } }