godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.1k stars 69 forks source link

Input Action Map - Import & Export feature for user defined actions. #8433

Closed ZycaR closed 9 months ago

ZycaR commented 9 months ago

Describe the project you are working on

Project Settings > Input Map: Feature for Import & Export user defined actions. https://github.com/godotengine/godot/pull/84902

Describe the problem or limitation you are having in your project

I've set up specific key bindings like AWSD, Q, E, Space, Ctrl, etc., in my project. It becomes inconvenient when I need to share these bindings across multiple projects or in future projects. Setting them up every time or directly editing the godot.project file (which is not advised) is a hassle.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

With the Export feature, you can save your custom action map and share it with other developers (i.e Oculus or PICO 4 VR controller bindings).

The Import feature allows you to read exported file (or directly the project.godot file) and add the imported actions to your existing project. This way, you can bring in multiple action maps without the trouble of manually defining them.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

image

If this enhancement will not be used often, can it be worked around with a few lines of script?

Yes, it's possible, but using a script to update the Project Settings file may lead to issues when upgrading between different versions of Godot. There's a crucial step in Project Settings to upgrade from an old config_version, and skipping it can cause problems.

Is there a reason why this should be core and not an add-on in the asset library?

It should be part of Project Settings as it directly enhance usability of Input Action Map editor.

Calinou commented 9 months ago

Thanks for the proposal! Consolidating in https://github.com/godotengine/godot-proposals/issues/423.