Developer console for Unity game engine.
Allows executing console command in runtime.
You can install DevConsole
using any of the following methods
-
Use UPM to install the package via the following git URL:
https://github.com/dkoleev/UnityDevConsole.git
-
openupm add com.yogi.devconsole
-
Drag prefab
DevConsole_GUI
to the scene. -
Add
ENABLE_DEV_CONSOLE
define toProjectSettings -> Scripting Define Symbols
.
You can add
ENABLE_DEV_CONSOLE
for dev build and remove it for release build in your build pipline.
- Create
public static
method. - Add attribute
DevConsoleCommand
for this method. - Specify the command name in the attribute parameter
commandName
.
[DevConsoleCommand("sum")]
public static void Sum(int arg1, int arg2) {
Debug.Log(arg1 + arg2);
}