Show / Hide Table of Contents

Class ConsoleUI

The interactive front-end of the console.

Inheritance
Object
Object
Component
Behaviour
MonoBehaviour
ConsoleUI
Namespace: Wenzil.Console
Assembly: Assembly-CSharp.dll
Syntax
[DisallowMultipleComponent]
[RequireComponent(typeof(ConsoleController))]
public class ConsoleUI : MonoBehaviour, IScrollHandler, IEventSystemHandler

Fields

| Improve this Doc View Source

inputField

Declaration
public InputField inputField
Field Value
Type Description
InputField
| Improve this Doc View Source

outputArea

Declaration
public ScrollRect outputArea
Field Value
Type Description
ScrollRect
| Improve this Doc View Source

outputText

Declaration
public Text outputText
Field Value
Type Description
Text
| Improve this Doc View Source

scrollbar

Declaration
public Scrollbar scrollbar
Field Value
Type Description
Scrollbar

Properties

| Improve this Doc View Source

isConsoleOpen

Indicates whether the console is currently open or close.

Declaration
public bool isConsoleOpen { get; }
Property Value
Type Description
Boolean

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

ClearInput()

Clears the console input.

Declaration
public void ClearInput()
| Improve this Doc View Source

ClearOutput()

Clears the console output.

Declaration
public void ClearOutput()
| Improve this Doc View Source

CloseConsole()

Closes the console.

Declaration
public void CloseConsole()
| Improve this Doc View Source

OnScroll(PointerEventData)

What to do when the user uses the scrollwheel while hovering the console input.

Declaration
public void OnScroll(PointerEventData eventData)
Parameters
Type Name Description
PointerEventData eventData
| 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()

Opens the console.

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
Type Description
Action
| Improve this Doc View Source

onSubmitCommand

Declaration
public event Action<string> onSubmitCommand
Event Type
Type Description
Action<String>
| Improve this Doc View Source

onToggleConsole

Declaration
public event Action<bool> onToggleConsole
Event Type
Type Description
Action<Boolean>

Extension Methods

MBExtensions.Invoke(MonoBehaviour, Action, Single)
MBExtensions.Invoke<T>(MonoBehaviour, Action<T>, T, Single)
MBExtensions.Invoke<T1, T2>(MonoBehaviour, Action<T1, T2>, T1, T2, Single)
MBExtensions.Invoke<T1, T2, T3>(MonoBehaviour, Action<T1, T2, T3>, T1, T2, T3, Single)
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX