InputSystem
InputSystem copied to clipboard
added generating enums for actions and control schemes to the code generator
Description
added generating enums for actions and control schemes to the code generator I have needed these enums for multiple things on my own projects, and have created them manually in a separate class. Having them automatically generated here will be a big help, and keep the enums up to date with the data, and prevent typos and misalignments between my code and the data.
Changes made
I added code to the code generator to add two things to the end of the generated code: an enum of actions for each mapping, and an enum of control schemes.
for example:
// MainGame action enums
public enum MainGameActionEnum
{
Move,
Look,
Interact,
Run,
UseItem,
NavigateMenu,
Options,
Cancel,
MenuPrevPage,
MenuNextPage,
StartGame
}
// control scheme enums
public enum ControlSchemeEnum
{
Controller,
KBM
}
Checklist
Before review:
- [x] Changelog entry added.
- Explains the change in
Changed
,Fixed
,Added
sections. - For API change contains an example snippet and/or migration example.
- FogBugz ticket attached, example
([case %number%](https://issuetracker.unity3d.com/issues/...))
. - FogBugz is marked as "Resolved" with next release version correctly set.
- Explains the change in
- [x] Tests added/changed, if applicable.
- Are tests applicable for editor script chnges?
- Functional tests
Area_CanDoX
,Area_CanDoX_EvenIfYIsTheCase
,Area_WhenIDoX_AndYHappens_ThisIsTheResult
. - Performance tests.
- Integration tests.
- [ ] Docs for new/changed API's.
- Xmldoc cross references are set correctly.
- Added explanation how the API works.
- Usage code examples added.
- The manual is updated, if needed.
During merge:
- [ ] Commit message for squash-merge is prefixed with one of the list:
-
NEW: ___
. -
FIX: ___
. -
DOCS: ___
. -
CHANGE: ___
. -
RELEASE: 1.1.0-preview.3
.
-
just closed and reopened PR because all the build tests say "waiting for status to be reported", and google said that closing and reopening the PR might fix that.
...but it didn't.