An in-game Lua console presented using Unity GUI. More...
Public Attributes | |
KeyCode | firstKey = KeyCode.BackQuote |
Hold down this key and press Second Key to open console. | |
KeyCode | secondKey = KeyCode.L |
Hold down First Key and press this key to open console. | |
bool | visible = false |
Is the console visible or hidden? | |
GUISkin | guiSkin |
Optional GUI Skin to style console window. | |
Vector2 | minSize = new Vector2(384f, 384f) |
The minimum size of the console window. | |
int | maxHistory = 20 |
The max number of previous commands to remember. | |
bool | pauseGameWhileOpen = false |
If true, then while open set Time.timeScale to 0. | |
Protected Member Functions | |
virtual void | Start () |
virtual void | SetVisible (bool newValue) |
virtual void | OnGUI () |
OnGUI draws the console if it's visible, and toggles visibility based on the key trigger. | |
virtual void | DrawConsole () |
Rect | DefineWindowRect () |
virtual void | DrawConsoleWindow (int id) |
virtual bool | IsKeyEvent (KeyCode keyCode) |
virtual void | RunLuaCommand () |
virtual string | GetLuaResultString (Lua.Result result) |
virtual string | FormatTableResult (Lua.Result result) |
virtual void | UseHistory (int direction) |
Protected Attributes | |
List< string > | m_history = new List<string>() |
int | m_historyPosition = 0 |
string | m_input = string.Empty |
string | m_output = string.Empty |
Rect | m_windowRect = new Rect(0, 0, 0, 0) |
Rect | m_closeButtonRect = new Rect(0, 0, 0, 0) |
Vector2 | m_scrollPosition = new Vector2(0, 0) |
bool | m_isFirstKeyDown = false |
An in-game Lua console presented using Unity GUI.
This console is activated by the key combination ~(tilde) + L (customizable) and allows you to enter Lua commands and view the results. The up and down keys scroll through previous commands, and Escape closes the console.
|
inlineprotected |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
OnGUI draws the console if it's visible, and toggles visibility based on the key trigger.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
KeyCode PixelCrushers.DialogueSystem.LuaConsole.firstKey = KeyCode.BackQuote |
Hold down this key and press Second Key to open console.
GUISkin PixelCrushers.DialogueSystem.LuaConsole.guiSkin |
Optional GUI Skin to style console window.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
int PixelCrushers.DialogueSystem.LuaConsole.maxHistory = 20 |
The max number of previous commands to remember.
Vector2 PixelCrushers.DialogueSystem.LuaConsole.minSize = new Vector2(384f, 384f) |
The minimum size of the console window.
bool PixelCrushers.DialogueSystem.LuaConsole.pauseGameWhileOpen = false |
If true, then while open set Time.timeScale to 0.
KeyCode PixelCrushers.DialogueSystem.LuaConsole.secondKey = KeyCode.L |
Hold down First Key and press this key to open console.
bool PixelCrushers.DialogueSystem.LuaConsole.visible = false |
Is the console visible or hidden?