Skip to content

FIX: InputActionCodeGenerator if an action map is named debug (ISXB-851)#1968

Merged
Pauliusd01 merged 3 commits intodevelopfrom
isxb-851-fix-for-actionmap-named-debug
Jul 18, 2024
Merged

FIX: InputActionCodeGenerator if an action map is named debug (ISXB-851)#1968
Pauliusd01 merged 3 commits intodevelopfrom
isxb-851-fix-for-actionmap-named-debug

Conversation

@bmalrat
Copy link
Copy Markdown
Collaborator

@bmalrat bmalrat commented Jul 18, 2024

Description

When generation an input action with an action map named "Debug" it generate a code that doesn't compile.
https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-851
Assets\InputSystem.cs(65,15): error CS1061: 'InputSystem.DebugActions' does not contain a definition for 'Assert' and no accessible extension method 'Assert' accepting a first argument of type 'InputSystem.DebugActions' could be found (are you missing a using directive or an assembly reference?)

Changes made

Added the prefix UnityEngine prefix to Debug to remove the ambiguity in the generated code

Testing

local test

Risk

Please describe the potential risks of your changes for the reviewers.

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • 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.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

@bmalrat bmalrat requested a review from Pauliusd01 July 18, 2024 13:27
Copy link
Copy Markdown
Collaborator

@Pauliusd01 Pauliusd01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, no errors when the "Debug" map name is used and I can interact with that map by adding actions/duplicating, renaming it again, etc without issues

@Pauliusd01 Pauliusd01 merged commit 5e1b12d into develop Jul 18, 2024
@Pauliusd01 Pauliusd01 deleted the isxb-851-fix-for-actionmap-named-debug branch July 18, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants