DevConsole is an easy-to-use tool for making you custom commands to run them in your game for debugging purpose.
// Initialization
var devConsole = new DevConsole();
var view = new DevConsoleView(_devConsole);
// Command declaration
[DevCmd(name: "Echo", help: "write argument to the debug console")]
private static void Echo(string message) => Debug.Log(message);
// Command registration
devConsole.Register<string>(Echo);
// Console rendering (see: DevConsoleRenderer.cs)
private void OnGUI() => view.OnGUI();
Find the manifest.json file in the Packages folder of your project and add a line to dependencies
field:
"com.alexmalyutindev.urp-ssr": "https://github.com/alexmalyutindev/unity-dev-console.git"
Or, you can add this package using PackageManager Add package from git URL
option:
https://github.com/alexmalyutindev/unity-dev-console.git
This project is MIT License - see the LICENSE file for details