Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
6c1586c
Add fix for ISXB-1560 warnings issue.
Darren-Kelly-Unity Aug 27, 2025
2efad11
Fix issue with all warning log's being shown when they shouldn't be.
Darren-Kelly-Unity Aug 28, 2025
bcae7e7
Update the changelog.
Darren-Kelly-Unity Aug 28, 2025
0778d3e
Fix incorrect check caused by moving code while refactoring.
Darren-Kelly-Unity Aug 28, 2025
284d736
Remove redundant using.
Darren-Kelly-Unity Aug 28, 2025
56527d6
Add IsNullOrEmpty check as GetAsset can return null.
Darren-Kelly-Unity Aug 28, 2025
e74d53f
Merge branch 'develop' into bugfix/ISXB-1560-inputactionmap-warnings
Darren-Kelly-Unity Aug 28, 2025
8ca84f4
Update code to reflect code reivew changes.
Darren-Kelly-Unity Aug 28, 2025
76f6071
Fix changelog spacing.
Darren-Kelly-Unity Aug 28, 2025
ba8fc29
Add fix to only not show warnings when the UI action map is missing.
Darren-Kelly-Unity Aug 28, 2025
8d7373e
Remove added whitespace.
Darren-Kelly-Unity Aug 28, 2025
4cbf7ec
Add comment to explain the early return when not finding a UI action …
Darren-Kelly-Unity Aug 28, 2025
c4306ad
Add unit tests for testing against warnings that should be shown if a…
Darren-Kelly-Unity Aug 28, 2025
62301af
Change test to have an empty action map in a better way.
Darren-Kelly-Unity Aug 29, 2025
b5ee4ff
Remove redundant using.
Darren-Kelly-Unity Aug 29, 2025
6d0f19d
Fix formatting for InputForUITests.
Darren-Kelly-Unity Sep 1, 2025
765ee06
Merge branch 'develop' into bugfix/ISXB-1560-inputactionmap-warnings
Darren-Kelly-Unity Sep 1, 2025
4a697c3
Merge branch 'develop' into bugfix/ISXB-1560-inputactionmap-warnings
Darren-Kelly-Unity Sep 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ however, it has to be formatted properly to pass verification tests.
### Fixed
- Fixed an issue where using Pen devices on Android tablets would result in double clicks for UI interactions. [ISXB-1456](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1456)
- Fixed an issue preventing an embedded platform from being released. It adds back some `#defines` to `XRSupport` and `InputDeviceCharacteristics`.
- Fixed a warning not showing the asset name correctly when the input action map parameters for runtime GUI were not setup.[ISXB-1560]

## [1.14.1] - 2025-07-10

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ public Context(InputActionAsset asset,
private string GetAssetReference()
{
var path = AssetDatabase.GetAssetPath(asset);
return path ?? asset.name;
if (string.IsNullOrEmpty(path))
{
return asset.name;
}
return path;
}

private void ActionMapWarning(string actionMap, string problem)
Expand All @@ -92,6 +96,11 @@ public void Verify(string actionNameOrId, InputActionType actionType, string exp

// Check if the map (if any) exists
var noMapOrMapExists = true;
if (asset.actionMaps.Count == 0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I do not understand why you are checking this? This code is trying to verify a single action (it's the intended purpose of the method). This method should not verify the asset, only the action within the asset. Additionally, based on the comments in the JIRA case, it seems like the desired outcome is to not generate all warnings when there is no "UI" map (relying on defaults), and not in the general case. If this is the goal with the fix is to disable all action verification when there is no UI map I suggest we remove this and instead add an early return to line #35 in this file. That early return I believe should also check for the presence of an "UI" action map and not check action map count in general. E.g.

if (asset.FindActionMap("UI", false) == null) return;

See https://docs.unity3d.com/Packages/[email protected]/api/UnityEngine.InputSystem.InputActionAsset.html#UnityEngine_InputSystem_InputActionAsset_FindActionMap_System_String_System_Boolean_

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also consider adding a unit test (do not remember if tests for this class exist or not that may be extended) to avoid future regression.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok got it, I think misunderstood this one, I went by what Paulius said but I didn't understand the first time round from reading the comment. I'll try to check with him to confirm.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, you are right! I understood from the ticket when there is nothing mapped in the input file, when it should have been no UI map there.

I made the change you suggested and now it seems to behave as expected fixing Paulius' issue below also.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have now added two unit tests also to test both that warnings are thrown when there are actions missing from the UI action map.

And another so that we do not have any warnings when no UI map exists.

{
return;
}

var index = actionNameOrId.IndexOf('/');
if (index > 0)
{
Expand Down