UnityEssentials
Small but useful tools and features for Unity
|
Base class to handle the console display in-game More...
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... | |
Base class to handle the console display in-game
Definition at line 8 of file ConsoleInGame/Console.cs.
|
protected |
Updates the console's visuals calling UpdateVisuals
Definition at line 61 of file ConsoleInGame/Console.cs.
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.
|
private |
Handles the logging of any log messages
Definition at line 95 of file ConsoleInGame/Console.cs.
|
protected |
Unregisters the console from the handling of the any log messages.
Definition at line 57 of file ConsoleInGame/Console.cs.
|
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.
void UnityEngine.Console.SetShow | ( | bool | newValue | ) |
Displays or not the console in-game
newValue | Weather the console should be displayed in-game or not. |
Definition at line 75 of file ConsoleInGame/Console.cs.
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.
|
private |
Handles the toggling ON and OFF of the console
Definition at line 84 of file ConsoleInGame/Console.cs.
|
protectedpure virtual |
Updates the visuals of the console
Implemented in UnityEngine.ConsoleTMP, UnityEngine.ConsoleTextUI, and UnityEngine.ConsoleGUI.
|
protected |
Should the console toggle on and off pressing the toggleKey?"
Definition at line 30 of file ConsoleInGame/Console.cs.
|
private |
The filename that will store the logs of the console.
Definition at line 18 of file ConsoleInGame/Console.cs.
|
package |
The log messages of the console.
Definition at line 13 of file ConsoleInGame/Console.cs.
int UnityEngine.Console.maxDisplayedChars = 700 |
Maximum amount of characters displayed by the console.
Definition at line 48 of file ConsoleInGame/Console.cs.
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.
|
protected |
If the console must be displayed or not.
Definition at line 24 of file ConsoleInGame/Console.cs.
KeyCode UnityEngine.Console.toggleKey = KeyCode.Space |
Key to toggle on-off the in-game console.
Definition at line 36 of file ConsoleInGame/Console.cs.