UnityEssentials
Small but useful tools and features for Unity
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Package Attributes | Private Member Functions | Private Attributes | List of all members
UnityEngine.ConsoleTMP Class Reference

Component to display the console (debug logs) in-game using a TMP_Text component More...

Collaboration diagram for UnityEngine.ConsoleTMP:
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

TMP_Text textTMP
 The TMP_Text component that is going to be updated to display all the log messages. More...
 
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

override void UpdateVisuals ()
 Updates the visuals of the console More...
 
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...
 

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

Component to display the console (debug logs) in-game using a TMP_Text component

Definition at line 10 of file ConsoleTMP.cs.

Member Function Documentation

◆ Awake()

void UnityEngine.Console.Awake ( )
protectedinherited

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 ( )
inherited

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 
)
privateinherited

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 ( )
protectedinherited

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 ( )
protectedinherited

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)
inherited

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 ( )
inherited

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 ( )
privateinherited

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()

override void UnityEngine.ConsoleTMP.UpdateVisuals ( )
protectedvirtual

Updates the visuals of the console

Implements UnityEngine.Console.

Definition at line 17 of file ConsoleTMP.cs.

Member Data Documentation

◆ enableKeyToggle

bool UnityEngine.Console.enableKeyToggle = true
protectedinherited

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

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

◆ filename

string UnityEngine.Console.filename = ""
privateinherited

The filename that will store the logs of the console.

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

◆ fullLog

string UnityEngine.Console.fullLog = ""
packageinherited

The log messages of the console.

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

◆ maxDisplayedChars

int UnityEngine.Console.maxDisplayedChars = 700
inherited

Maximum amount of characters displayed by the console.

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

◆ saveToFile

bool UnityEngine.Console.saveToFile = false
inherited

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
protectedinherited

If the console must be displayed or not.

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

◆ textTMP

TMP_Text UnityEngine.ConsoleTMP.textTMP

The TMP_Text component that is going to be updated to display all the log messages.

Definition at line 15 of file ConsoleTMP.cs.

◆ toggleKey

KeyCode UnityEngine.Console.toggleKey = KeyCode.Space
inherited

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: