Simple C# based developer console for Godot 4.3+.
git clone
this repo into the/addons
folder of your Godot project. You should have a/addons/vekDevConsole
folder with all of the plugin's files.- Build the C# solution. If you are placing the addon in a new project, you might have to make a random empty C# script first to be able to build it.
- Enable the
Dev Console
in the plugins tab of your project settings. - Add a
dev_console
action into your project's input map, which can also be found in the project settings (this is necessary for opening the console). - Add the
DevConsole
node to a desired scene in your project. It is strongly recommended to then set the anchor preset toFull Rect
. - Console time B).
To add a command to the console, use the DevConsole's AddCommand(name, command)
method. This is static, and will be accessed anywhere in your project as DevConsole.AddCommand
The name property is a generic string, however the command is a class consisting of 3 notable properties:
- Action: The main method to execute with the console command. Supports arguments of type int, float, string or bool, and is required.
- ReadAction: An alternate method executed if the command was submitted with no arguments. Usually used to retrieve the value of a property, but can be used for other means (for instance with the help command, printing all commands and their descriptions). Doesn't support arguments, and is optional.
- Description: The command's description used when getting help. Technically optional, but not advised to omit.
You can also remove commands with RemoveCommand(name)
This will not work natively in GDScript, and will require you to create a C# script with methods that call the GDScript from there, and then create commands for those methods.
- Make a more in-depth readme with more of the actual usage details of the console.
- Be able to show the same content as the editor output window.
- Other small fixes and improvements.