Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timit0/generateinputhelper
Generate c# a class from GODOT .godot file, all the custom input will be in.
https://github.com/timit0/generateinputhelper
cpp csharp generated-code godot helper input
Last synced: about 2 months ago
JSON representation
Generate c# a class from GODOT .godot file, all the custom input will be in.
- Host: GitHub
- URL: https://github.com/timit0/generateinputhelper
- Owner: Timit0
- Created: 2024-11-13T09:18:03.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-13T10:05:12.000Z (about 2 months ago)
- Last Synced: 2024-11-13T10:19:42.592Z (about 2 months ago)
- Topics: cpp, csharp, generated-code, godot, helper, input
- Language: C++
- Homepage:
- Size: 938 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GenerateInputHelper
**GenerateInputHelper** is a small command-line tool that generates a static class from a `project.godot` file. This utility makes it easier to reference your input actions in a type-safe way.
---
## Steps to Use GenerateInputHelper
### First Step:
- Provide the path to your `project.godot` file: ``C:////``
- **Note**: The file name does not have to be `project.godot` specifically; it can have any name as long as it points to your project file.### Second Step:
- Specify an output path where the generated class file should be saved: ``C://``### Third Step:
- Provide a name for the generated file & class names: ````----
## Example
1. C:/test/project/project.godot
2. C:/test/project/helper
3. InputHelper### The result:
```
public static class InputHelper
{
public static string first_action
{
return nameof(first_action)
}public static string second_action
{
return nameof(second_action)
}
}
```## Utilities
- If I have ``Input.IsActionJustPressed("jump")`` it's dangerous. If I change the action name in my godot project I need to modify all of action using ``jump``.
- If I have ``Input.IsActionJustPressed(InputHelper.jump)`` it's a way more flexible. If I want to change the action name, I just need to change the name once.
- It's faster than typing all this class manually.