GenesisAN.Limbo.Console.Sharp
0.0.1-beta-008-fork1
dotnet add package GenesisAN.Limbo.Console.Sharp --version 0.0.1-beta-008-fork1
NuGet\Install-Package GenesisAN.Limbo.Console.Sharp -Version 0.0.1-beta-008-fork1
<PackageReference Include="GenesisAN.Limbo.Console.Sharp" Version="0.0.1-beta-008-fork1" />
<PackageVersion Include="GenesisAN.Limbo.Console.Sharp" Version="0.0.1-beta-008-fork1" />
<PackageReference Include="GenesisAN.Limbo.Console.Sharp" />
paket add GenesisAN.Limbo.Console.Sharp --version 0.0.1-beta-008-fork1
#r "nuget: GenesisAN.Limbo.Console.Sharp, 0.0.1-beta-008-fork1"
#:package GenesisAN.Limbo.Console.Sharp@0.0.1-beta-008-fork1
#addin nuget:?package=GenesisAN.Limbo.Console.Sharp&version=0.0.1-beta-008-fork1&prerelease
#tool nuget:?package=GenesisAN.Limbo.Console.Sharp&version=0.0.1-beta-008-fork1&prerelease
LimboConsole.Sharp
This nuget package is a c# wrapper that helps facilitate using the limbo_console godot plugin in c#.
Table of Contents
- Requirements
- Installation
- Getting Started
- Documentation
- Contributing
- Features
- Changelog
- License
- Contributors
✨ Features
- Simplified Integration: Easily interact with the 💻 limbo_console godot plugin from a c# godot game.
- Command Registration: Register commands with descriptions and auto-complete sources.
- Auto-Complete Support: Add auto-complete sources for command arguments.
- Demo Project: Includes examples for initialization, commands, and advanced features.
🛠️ Requirements
- Godot Engine: Version 4.4.X or higher.
- .NET SDK: Version 8.0
- limbo_console plugin: Installed and enabled in your godot project. See 💻 limbo console.
🖥️ Installation
Ensure the 💻 limbo console plugin is installed and enabled in your godot project:
- Go to Project > Project Settings > Plugins and enable the plugin.
Install the nuget package for your godot c# project (compatible with godot 4.4.X).
Using dotnet CLI
Run the following command:
dotnet add package LimboConsole.Sharp
Using csproj
Add the following line to your godot game's csproj
<PackageReference Include="LimboConsole.Sharp" Version="<specify.your.version>" />
📝 Getting started
Register a Command
// Access the console statically from any node within the tree
LimboConsole.RegisterCommand(new Callable(this, MethodName.StartGame), "start_game", "Starts the game");
private void StartGame() {
// Do something
}
Using the [ConsoleCommand] Attribute
You can also use the [ConsoleCommand] attribute to easily define commands.
💡You must call
RegisterConsoleCommands()to enable your class's [ConsoleCommands].
// By default use name of function exactly
[ConsoleCommand]
private void LogFromAttribute() => LimboConsole.Info($"{GlobalPosition}");
// Pass a custom name
[ConsoleCommand("CoolName")]
private void AFunctionName() => LogFromAttribute();
// Pass a custom name and description
[ConsoleCommand("Say", "Shows a message in the console")]
private void Print(string message) => LimboConsole.Info(message);
// Remember to register the commands!
private void _Ready() {
// This will register the commands
RegisterConsoleCommands();
}
Register an Auto-Complete Source
You can also add auto-complete sources for command arguments:
LimboConsole.AddArgumentAutocompleteSource("abc", 1, Callable.From(() => new string[] { "a", "b", "c" }));
This example adds an auto-complete source for the first argument of the abc command, suggesting the values a, b, or c.
Note: when registering an argument index starts at 1 not 0 and currently has a max of 5 arguments
Using the [AutoComplete] Attribute
You can also use the [AutoComplete] attribute to quickly define autocompletes for your attribute based console commands
💡You must call
RegisterConsoleCommands()to enable your class's [AutoComplete]'s!
[ConsoleCommand]
[AutoComplete(nameof(Colors))]
public void FavoriteColorCommand(string colors) {
// Do something
}
private string[] Colors() {
return new [] {"red", "blue", "green"};
}
This example adds an auto-complete source for the first argument of the FavoriteColorCommand command, suggesting the values red, blue, and green.
More examples
See run the demo project and see Demo.cs for more examples of how to use the package
📚 Documentation
See summary comments in nuget package or refer to 💻 limbo_console
For a detailed history of changes, see the Changelog.
🤝 Contributing
Thanks for your interest in contributing. Please follow these guidelines to keep the project consistent and maintainable in the long-term. Keep in mind this is just a wrapper. Feature or bug fixes for the requests for the console itself should go here 💻 limbo_console.
After a feature is added and/or the public api changes this repo will need to be updated so help keeping it up to date is appreciated!
See something you want or could improve upon? Make a PR! ✨
Project structure
Limbo.Console.Sharp: The root of the nuget package.
- Pack: Use
dotnet packto create the package. Alternatively, run the provided.batscript on Windows to automate packaging to the demo project.
The
.batfile is a helpful reference for understanding how the demo project and the nuget package interact. It automates the packaging process for Windows users to test changes in the demo project.- Pack: Use
Demo Project: A sample godot project included to demonstrate:
- Registering commands and auto-complete sources.
- Using advanced features like signals and callable commands.
Note: Currently, there is no quick script for packaging on non-Windows platforms. Contributions to add this functionality are welcome!
Code Style & Recommendations
- Follow the official Microsoft coding conventions and name identifiers
📋 Changelog
See the CHANGELOG.md file for a detailed list of changes in each version.
📜 License
This project is licensed under the MIT License. See the LICENSE file for details.
👥 Contributors
Thanks to these wonderful people for their contributions:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- GodotSharp (>= 4.5.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.1-beta-008-fork1 | 229 | 11/5/2025 |
See the changelog at
https://github.com/RcubDev/limbo_console_sharp/blob/main/CHANGELOG.md