UnityEssentials
Small but useful tools and features for Unity
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Package Attributes | Private Member Functions | Private Attributes | List of all members
UnityEngine.Console Class Referenceabstract

Base class to handle the console display in-game More...

Collaboration diagram for UnityEngine.Console:
Collaboration graph

Public Member Functions

void ToggleShow ()
 Inverts the "show" state of the console. If it was being displayed, it will no longer be. If it was not, it will be. More...
 
void SetShow (bool newValue)
 Displays or not the console in-game More...
 
void Clear ()
 Clears the console and starts a new file for the saved logs. More...
 

Public Attributes

KeyCode toggleKey = KeyCode.Space
 Key to toggle on-off the in-game console. More...
 
bool saveToFile = false
 Should the logs be saved to a file in the desktop? More...
 
int maxDisplayedChars = 700
 Maximum amount of characters displayed by the console. More...
 

Protected Member Functions

void OnEnable ()
 Registers the console to handle any log messages received and updates the visuals calling UpdateVisuals. More...
 
void OnDisable ()
 Unregisters the console from the handling of the any log messages. More...
 
void Awake ()
 Updates the console's visuals calling UpdateVisuals More...
 
abstract void UpdateVisuals ()
 Updates the visuals of the console More...
 

Protected Attributes

bool show = true
 If the console must be displayed or not. More...
 
bool enableKeyToggle = true
 Should the console toggle on and off pressing the toggleKey?" More...
 

Package Attributes

string fullLog = ""
 The log messages of the console. More...
 

Private Member Functions

void Update ()
 Handles the toggling ON and OFF of the console More...
 
void Log (string logString, string stackTrace, LogType type)
 Handles the logging of any log messages More...
 

Private Attributes

string filename = ""
 The filename that will store the logs of the console. More...
 

Detailed Description

Base class to handle the console display in-game

Definition at line 8 of file ConsoleInGame/Console.cs.

Member Function Documentation

◆ Awake()

void UnityEngine.Console.Awake ( )
protected

Updates the console's visuals calling UpdateVisuals

Definition at line 61 of file ConsoleInGame/Console.cs.

Here is the call graph for this function:

◆ Clear()

void UnityEngine.Console.Clear ( )

Clears the console and starts a new file for the saved logs.

Definition at line 136 of file ConsoleInGame/Console.cs.

Here is the call graph for this function:

◆ Log()

void UnityEngine.Console.Log ( string  logString,
string  stackTrace,
LogType  type 
)
private

Handles the logging of any log messages

Definition at line 95 of file ConsoleInGame/Console.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnDisable()

void UnityEngine.Console.OnDisable ( )
protected

Unregisters the console from the handling of the any log messages.

Definition at line 57 of file ConsoleInGame/Console.cs.

Here is the call graph for this function:

◆ OnEnable()

void UnityEngine.Console.OnEnable ( )
protected

Registers the console to handle any log messages received and updates the visuals calling UpdateVisuals.

Definition at line 53 of file ConsoleInGame/Console.cs.

Here is the call graph for this function:

◆ SetShow()

void UnityEngine.Console.SetShow ( bool  newValue)

Displays or not the console in-game

Parameters
newValueWeather the console should be displayed in-game or not.

Definition at line 75 of file ConsoleInGame/Console.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ToggleShow()

void UnityEngine.Console.ToggleShow ( )

Inverts the "show" state of the console. If it was being displayed, it will no longer be. If it was not, it will be.

Definition at line 66 of file ConsoleInGame/Console.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Update()

void UnityEngine.Console.Update ( )
private

Handles the toggling ON and OFF of the console

Definition at line 84 of file ConsoleInGame/Console.cs.

Here is the call graph for this function:

◆ UpdateVisuals()

abstract void UnityEngine.Console.UpdateVisuals ( )
protectedpure virtual

Updates the visuals of the console

Implemented in UnityEngine.ConsoleTMP, UnityEngine.ConsoleTextUI, and UnityEngine.ConsoleGUI.

Here is the caller graph for this function:

Member Data Documentation

◆ enableKeyToggle

bool UnityEngine.Console.enableKeyToggle = true
protected

Should the console toggle on and off pressing the toggleKey?"

Definition at line 30 of file ConsoleInGame/Console.cs.

◆ filename

string UnityEngine.Console.filename = ""
private

The filename that will store the logs of the console.

Definition at line 18 of file ConsoleInGame/Console.cs.

◆ fullLog

string UnityEngine.Console.fullLog = ""
package

The log messages of the console.

Definition at line 13 of file ConsoleInGame/Console.cs.

◆ maxDisplayedChars

int UnityEngine.Console.maxDisplayedChars = 700

Maximum amount of characters displayed by the console.

Definition at line 48 of file ConsoleInGame/Console.cs.

◆ saveToFile

bool UnityEngine.Console.saveToFile = false

Should the logs be saved to a file in the desktop?

Definition at line 42 of file ConsoleInGame/Console.cs.

◆ show

bool UnityEngine.Console.show = true
protected

If the console must be displayed or not.

Definition at line 24 of file ConsoleInGame/Console.cs.

◆ toggleKey

KeyCode UnityEngine.Console.toggleKey = KeyCode.Space

Key to toggle on-off the in-game console.

Definition at line 36 of file ConsoleInGame/Console.cs.


The documentation for this class was generated from the following file: