UnityEssentials
Small but useful tools and features for Unity
ConsoleGUI.cs
Go to the documentation of this file.
1 namespace UnityEngine
2 {
6  public class ConsoleGUI : Console
7  {
11  private void OnGUI()
12  {
13  if (!show)
14  return;
15 
16  GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(Screen.width / 1200.0f, Screen.height / 800.0f, 1.0f));
17  GUI.TextArea(new Rect(10, 10, 540, 370), fullLog);
18  }
19 
20  protected override void UpdateVisuals()
21  {
22  // -- Visual update done at "OnGUI"
23  }
24 
25  }
26 }
Base class to handle the console display in-game
bool show
If the console must be displayed or not.
string fullLog
The log messages of the console.
Component to display the console (debug logs) in-game using Unity's GUI class
Definition: ConsoleGUI.cs:7
void OnGUI()
Updates the visuals of the console
Definition: ConsoleGUI.cs:11
override void UpdateVisuals()
Updates the visuals of the console
Definition: ConsoleGUI.cs:20