Skip to content

Hyrdaboo/DwarfConsole

Repository files navigation

Dwarf Console

A C# based in-game console for Godot.

Setup

  1. Clone this repo

  2. Drag and Drop the addons folder into your project

  3. Create a new C# script so that godot creates a new visual studio solution for this project (this step is crucial)

  4. Build your project by hitting the build button or alt+B

  5. Go to Project > Project Settings > Plugins find DwarfConsole there and enable it

  6. Open up Input Map and add a new Action called "ToggleConsole" and add a keybinding. But if you wanna take a look at the demos you'll need this confugiration:

    image

    Note I forgot to put Jump in this screenshot do include that too.

After completing these steps you are ready to use the console. You can change some of the default settings of the console from Project > Project Settings > General > DwarfConsole

Usage

Inside a node's script:

using DwarfConsole;
using Godot;

// we need this attribute to tell the console this class has commands
[ConsoleParse]
public partial class MyCommandScript : Node
{

	// this attribute marks the method as a command
	[ConsoleCommand("sum", "adds 2 numbers")]
	public void Sum(int num1, int num2)
	{
		Console.Log($"Result: {num1+num2}");
	}
}

For more examples check out the demo inside the Samples folder. Don't forget to add GlobalSettings.cs to autoload

About

A C# based in-game console for Godot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages