stride3d / stride3d/stride

Setup VirtualButtons, configs and config sets from the editor

Open
#2,292 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Is your feature request related to a problem? Please describe.
You have to setup VirtualButtons, Configs and ConfigSets from code, which there isn't a clear nice spot to set them up from. And can be hard to get a nice overview of each control and its bindings. Also less inviting for less technical users.

Describe the solution you'd like
The ability to make VirtualButtonConfig assets which can be configured in the editor. In GameSettings add a list of VirtualButtonConfigs (asset references), much like the Default Scene and Graphics Compositor properties. And automatically add the configs to the InputManager's VirtualButtonConfigSet.

Could have VirtualButtonConfigSet assets as well, but I was unable to think of a use-case, and would add an extra step to the setup process and managment.

An alternative idea would be to have a asset per VirtualButton binding name (like all the VirtualButtons for "Forward" in one asset). But this feels like more asset managment/clutter, and very few use-cases for it.

A challenge that we might run in to is that because we use System.object for the binding key, we would either need to limit in some way the types avaliable in the editor. Possibly hardcode supported types to string, int, any Enum. Alternatively some sort of BindingTypeProvider class or attribute that could be used to give support to user defined types.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing VirtualButtonConfig, VirtualButtonConfigSet, InputManager, and GameSettings entry points. Trace how VirtualButtons, Configs, and ConfigSets are currently created from code, then review the editor asset and binding-key requirements. Done means VirtualButtonConfig assets can be configured in the editor, referenced from GameSettings, and added automatically to the InputManager.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.