C# Class DeveloperConsole, TheUnseen

Developer Console class
Inheritance: MonoBehaviour
Show file Open project: henryj41043/TheUnseen Class Usage Examples

Public Properties

Property Type Description
aliasList DeveloperConsoleAlias[],
autocompleteBoxMaxSize Vector2
autocompleteKeyCode KeyCode,
autocompleteSelectedColor Color
copyLogOutput bool
disallowedChars char[]
guiSkin UnityEngine.GUISkin
lineHeight float
onlyAcceptAliases bool
showCursorWhenActive bool
textFieldHeight float
toggleKeyCode KeyCode,
transitionTime float
xSizePercent float
ySizePercent float

Public Methods

Method Description
ApplyAutocompleteText ( ) : void
ApplyCommandsToGameObject ( GameObject go, string workWithText, bool printResult ) : void
CopyLogOutout ( String condition, String stackTrace, LogType type ) : void
DrawAutocompleteWindow ( string title, string names, Vector2 offset, int selectedIndex ) : void
DrawAutocompleteWindow ( string title, string names, Vector2 offset, int selectedIndex, int windowIndex ) : void
GetField ( GameObject gameObject, Component component, string fieldName ) : void
GetProperty ( GameObject gameObject, Component component, string propertyName ) : void
OnDisable ( ) : void
OnGUI ( ) : void
PrintToConsole ( string text ) : void
RunMethod ( GameObject gameObject, Component component, string methodName, string arguments, bool printResult ) : void
ScrollToDisplaySelected ( ) : void
SetField ( GameObject gameObject, Component component, string fieldName, string argument ) : void
SetProperty ( GameObject gameObject, Component component, string propertyName, string argument ) : void
Update ( ) : void

Private Methods

Method Description
FindAllGameObjects ( ) : IEnumerator
ParseStringToObject ( Type objectType, string argument, object &returnObject ) : bool
Start ( ) : IEnumerator

Method Details

ApplyAutocompleteText() public method

public ApplyAutocompleteText ( ) : void
return void

ApplyCommandsToGameObject() public method

public ApplyCommandsToGameObject ( GameObject go, string workWithText, bool printResult ) : void
go GameObject
workWithText string
printResult bool
return void

CopyLogOutout() public method

public CopyLogOutout ( String condition, String stackTrace, LogType type ) : void
condition String
stackTrace String
type LogType
return void

DrawAutocompleteWindow() public method

public DrawAutocompleteWindow ( string title, string names, Vector2 offset, int selectedIndex ) : void
title string
names string
offset Vector2
selectedIndex int
return void

DrawAutocompleteWindow() public method

public DrawAutocompleteWindow ( string title, string names, Vector2 offset, int selectedIndex, int windowIndex ) : void
title string
names string
offset Vector2
selectedIndex int
windowIndex int
return void

GetField() public method

public GetField ( GameObject gameObject, Component component, string fieldName ) : void
gameObject GameObject
component Component
fieldName string
return void

GetProperty() public method

public GetProperty ( GameObject gameObject, Component component, string propertyName ) : void
gameObject GameObject
component Component
propertyName string
return void

OnDisable() public method

public OnDisable ( ) : void
return void

OnGUI() public method

public OnGUI ( ) : void
return void

PrintToConsole() public method

public PrintToConsole ( string text ) : void
text string
return void

RunMethod() public method

public RunMethod ( GameObject gameObject, Component component, string methodName, string arguments, bool printResult ) : void
gameObject GameObject
component Component
methodName string
arguments string
printResult bool
return void

ScrollToDisplaySelected() public method

public ScrollToDisplaySelected ( ) : void
return void

SetField() public method

public SetField ( GameObject gameObject, Component component, string fieldName, string argument ) : void
gameObject GameObject
component Component
fieldName string
argument string
return void

SetProperty() public method

public SetProperty ( GameObject gameObject, Component component, string propertyName, string argument ) : void
gameObject GameObject
component Component
propertyName string
argument string
return void

Update() public method

public Update ( ) : void
return void

Property Details

aliasList public property

List of all aliases the console will utilise at runtime
public DeveloperConsoleAlias[], aliasList
return DeveloperConsoleAlias[],

autocompleteBoxMaxSize public property

public Vector2 autocompleteBoxMaxSize
return Vector2

autocompleteKeyCode public property

The key used to trigger text autocompletion during typing
public KeyCode, autocompleteKeyCode
return KeyCode,

autocompleteSelectedColor public property

public Color autocompleteSelectedColor
return Color

copyLogOutput public property

Whether or not to print standard log (Debug.Log) output to the Developer Console
public bool copyLogOutput
return bool

disallowedChars public property

public char[] disallowedChars
return char[]

guiSkin public property

The GUI Skin the console will utilise for rendering
public GUISkin,UnityEngine guiSkin
return UnityEngine.GUISkin

lineHeight public property

Height of each text line in the console�s output window
public float lineHeight
return float

onlyAcceptAliases public property

Whether or not to only accept aliases and not the standard variable and function call syntax
public bool onlyAcceptAliases
return bool

showCursorWhenActive public property

public bool showCursorWhenActive
return bool

textFieldHeight public property

Height in pixels of the console�s textbox
public float textFieldHeight
return float

toggleKeyCode public property

The key used to toggle the display of the console
public KeyCode, toggleKeyCode
return KeyCode,

transitionTime public property

Time (in seconds) that the console takes to enter and leave the frame
public float transitionTime
return float

xSizePercent public property

Width of the console in percentage of the screen size (0.0 to 1.0)
public float xSizePercent
return float

ySizePercent public property

Height of the console in percentage of the screen size (0.0 to 1.0)
public float ySizePercent
return float