Developer Console for Unity with easy integration to existing projects.
- Development cheats
- Debug assistance
- In game cheat codes, change settings easily etc
- Download and import DeveloperConsole package into your project
- Drag & drop DeveloperConsole prefab into your scene
- Add
[ConsoleCommand()]
attribute to your methods like below. See ConsoleExamples.cs for all examples. - Play your scene and press
§
to toggle Developer Console
using UnityEngine;
public class ExampleScript : MonoBehaviour {
[ConsoleCommand("test")]
private void Test() {
Debug.Log("Called 'test' from Console!");
}
[ConsoleCommand("test_int")]
private void TestInt(int i) {
// single parameter allowed types:
// int, float, string, bool, double, char, string[], Vector2, Vector3, Vector4, Quaternion
Debug.Log(string.Format("Called 'test_int' with value: {0} from Console!", i));
}
[ConsoleCommand("test_multi")]
private void TestMulti(int i, float f) {
// multi parameter allowed types:
// int, float, string, bool, double, char
Debug.Log(string.Format("Called 'test_multi' with value: {0} and {1} from Console!", i, f));
}
}
- Call static, non-static and Unity Coroutines methods (both public and private)
- No parameter and optional parameter(s) support
- Single parameter support with following types:
- int, float, string, bool, double, char, string[], Vector2, Vector3, Vector4, Quaternion
- Multi parameter support with following types:
- int, float, string, bool, double, char
- Easy drag & drop setup
- Mono and IL2CPP support
- Desktop and WebGL support
- Domain/Scene reload support (Enter Play Mode)
- Simple static runtime API
- 2 GUI styles: Large and Minimal
- Draggable & resizable window (Large GUI only)
- Log messages into Console Window (
Console.Log
,Debug.Log
andDebug.LogError
) - Input predictions
- Settings to tweak
- GUI themes (Dark, Darker, Red or Custom)
- Documentation and example scenes
Developer Console comes with few commands by default.
help
- Print list of available commandsquit
- Quit the applicationclose
- Close Consoleclear
- Clear all Console messagesreset
- Reset Console window to default size and position (Large GUI only)max_fps (int)
- Set Application.TargetFrameRateconsole_style
- Toggle GUI style between Large and Minimal
Editor and Development build only:
scene_loadindex (int)
- Load scene asynchronously by build indexscene_addloadindex (int)
- Load scene asynchronously additively by build indexscene_loadname (string)
- Load scene asynchronously by scene namescene_unloadindex (int)
- Unload scene asynchronously by build indexscene_unloadname (string)
- Unload scene asynchronously by scene namescene_information
- Print Scene count and namesempty
- Log empty line to consoledebug_renderinfo
- Print rendering information: High and Avg FPS, highest draw call, batches, triangle and vertices count. This command is editor only.log_to_file
- Log all current messages to .txt file. This command is Editor only.
Console.Log("hello")
to output directly into Developer Console window.
Console.Log("hello", Color.red)
with color.
Console.Log("<color=red>hello</color>")
with Rich Text color.
By default Unity Debug.Log()
or Debug.LogError()
messages will also output to Developer Console.
- Requires Unity 2019 or later
- Uses old Unity input system
- Uses Gameobject based UI
- Uses TextMeshPro