void Update()
    {
        if (commandLineCore.openWindowHotkey != "" && commandLineCore.openWindowHotkey != null)
        {
            if (!window.activeSelf && Input.GetKeyDown(commandLineCore.openWindowHotkey))
            {
                OpenCLIUWindow();
            }
        }

        if (commandLineCore.closeWindowHotkey != "" && commandLineCore.closeWindowHotkey != null)
        {
            if (window.activeSelf && Input.GetKeyDown(commandLineCore.closeWindowHotkey))
            {
                CloseCLIUWindow();
            }
        }

        if (commandLineCore.resetWindowHotkey != "" && commandLineCore.resetWindowHotkey != null)
        {
            if (Input.GetKeyDown(commandLineCore.resetWindowHotkey))
            {
                commandLineCore.RunCommand(new string[1] {
                    "reset"
                });
            }
        }
    }
Ejemplo n.º 2
0
    public void SendCommandToCore()
    {
        if (inputField.text != "")
        {
            SaveCommand(inputField.text);
            PrintInputOnView(inputField.text);

            string[] args = inputField.text.Split(' ');

            cliCore.RunCommand(args);
            inputField.text = "";
        }
    }