Class ConsoleUI
The interactive front-end of the console.
Assembly: Assembly-CSharp.dll
Syntax
[DisallowMultipleComponent]
[RequireComponent(typeof(ConsoleController))]
public class ConsoleUI : MonoBehaviour, IScrollHandler, IEventSystemHandler
Fields
|
Improve this Doc
View Source
Declaration
public InputField inputField
Field Value
|
Improve this Doc
View Source
outputArea
Declaration
public ScrollRect outputArea
Field Value
|
Improve this Doc
View Source
outputText
Declaration
Field Value
|
Improve this Doc
View Source
Declaration
public Scrollbar scrollbar
Field Value
Properties
|
Improve this Doc
View Source
isConsoleOpen
Indicates whether the console is currently open or close.
Declaration
public bool isConsoleOpen { get; }
Property Value
Methods
|
Improve this Doc
View Source
AddNewOutputLine(String)
Displays the given message as a new entry in the console output.
Declaration
public void AddNewOutputLine(string line)
Parameters
Type |
Name |
Description |
String |
line |
|
|
Improve this Doc
View Source
Clears the console input.
Declaration
|
Improve this Doc
View Source
ClearOutput()
Clears the console output.
Declaration
public void ClearOutput()
|
Improve this Doc
View Source
CloseConsole()
Declaration
public void CloseConsole()
|
Improve this Doc
View Source
What to do when the user uses the scrollwheel while hovering the console input.
Declaration
public void OnScroll(PointerEventData eventData)
Parameters
|
Improve this Doc
View Source
OnSubmit(String)
What to do when the user wants to submit a command.
Declaration
public void OnSubmit(string input)
Parameters
Type |
Name |
Description |
String |
input |
|
|
Improve this Doc
View Source
OpenConsole()
Declaration
public void OpenConsole()
|
Improve this Doc
View Source
SetInputText(String)
Writes the given string into the console input, ready to be user submitted.
Declaration
public void SetInputText(string input)
Parameters
Type |
Name |
Description |
String |
input |
|
|
Improve this Doc
View Source
ToggleConsole(Boolean)
Opens or closes the console.
Declaration
public void ToggleConsole(bool force = false)
Parameters
Type |
Name |
Description |
Boolean |
force |
|
Events
|
Improve this Doc
View Source
onClearConsole
Declaration
public event Action onClearConsole
Event Type
|
Improve this Doc
View Source
onSubmitCommand
Declaration
public event Action<string> onSubmitCommand
Event Type
|
Improve this Doc
View Source
onToggleConsole
Declaration
public event Action<bool> onToggleConsole
Event Type
Extension Methods
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)