An In-Game Debug Console for Unity that allows real-time logging, filtering, and executing commands during runtime. This tool helps developers and testers debug their games while running on any platform without relying on the Unity Editor Console.
- In-Game Log Viewer: Displays logs, warnings, and errors in a UI panel.
- Filtering System: Toggle between logs, warnings, and errors for easy debugging.
- Command Execution: Run commands directly from the console.
- Debug Variable Inspection: Automatically detects and displays script variables marked with
[DebugVariable]
. - Clear Logs: Remove all logs with a single button.
- Toggle Console: Open and close the console via UI or a keybind.
- Setup Wizard: Easily configure the debug console in the Unity Editor.
- Download the latest
.unitypackage
from the Releases section on GitHub. - In Unity, go to
Assets > Import Package > Custom Package
and select the downloaded.unitypackage
. - Import all necessary files.
- Open the Setup Wizard (
Tools > In-Game Debug Console Setup
). - Choose one of the following options:
- Enable Automatic Canvas Creation: Creates a new canvas dedicated to the debug console.
- Assign Existing Canvas: Select an existing canvas in the scene for the debug console.
- Select a UI button to open/close the console.
- Click Apply Settings to finalize the setup.
- Use the assigned UI button to open the console.
Use Unity's built-in logging methods:
Debug.Log("This is a log message");
Debug.LogWarning("This is a warning message");
Debug.LogError("This is an error message");
- Click on the Log, Warning, or Error buttons to filter messages.
- Click the Clear button to remove all logs from the display.
- Enter a command in the text field and press Enter.
- The console will execute the command if it matches a valid function.
- Enter the command 'help' to get a list of all available commands.
- Key commands include 'list' and 'set' which allows the users to list all the variables marked with [DebugVariable] attribute and change their values at runtime using the 'set' command.
To expose script variables for runtime modification, mark them with the [DebugVariable] attribute:
public class Player : MonoBehaviour {
[DebugVariable]
public float speed = 5.0f;
}
These variables can then be viewed and modified from the console.
- Modify the UI in the Unity Editor to match your project’s design.
- Adjust keybinds for opening/closing the console in the
inGameDebugConsole.cs
script. - Configure settings using the Setup Wizard.
Pull requests are welcome! If you have suggestions or want to improve the console, feel free to contribute.
This project is open-source under the Apache 2.0 License.
This project is still under development, and new features will be added soon!
For any issues, feel free to open a GitHub issue or reach out!