1 using System.Collections;
2 using System.Collections.Generic;
22 private int history_index = 0;
28 if(!DevConsoleOutput) DevConsoleOutput = GetComponent<Text>();
29 if(!DevConsoleOutput) AVR_DevConsole.error(
"DevConsoleMirror " + gameObject.name +
" does not have a Text Component!");
35 Invoke(
"FocusInputField", 0.01f);
40 DevConsoleInput.Select();
41 DevConsoleInput.ActivateInputField();
45 DevConsoleOutput.text = AVR_DevConsole.get_text();
48 if(Input.GetKeyDown(KeyCode.UpArrow)) {
49 DevConsoleInput.text = AVR_DevConsole.history(history_index);
52 else if (Input.GetKeyDown(KeyCode.DownArrow))
55 DevConsoleInput.text = AVR_DevConsole.history(history_index);
57 if(DevConsoleInput.isFocused && DevConsoleInput.text !=
"" && Input.GetKey(AVR.Core.AVR_Settings.get_key(
"/settings/core/devConsole/submitConsoleKey")))
70 if(!DevConsoleInput) {
71 AVR_DevConsole.error(
"DevConsoleMirror " + gameObject.name +
" tried to run a command, but no input component was assigned!");
74 AVR_DevConsole.command(DevConsoleInput.text);
75 DevConsoleInput.text =
"";
Monobehaviour but with an added URL button to a documentation page.
InputField DevConsoleInput
Sets the documentation html file inside of Packages/com.avr.core/Documentation/html of a given class...
void run_command()
Run the command that is written in DevConsoleInput.
Mirrors the output of the DevConsole onto a Text component. To use, simply assign "DevConsoleOutput" ...