Skip to content

Commit 62301af

Browse files
Change test to have an empty action map in a better way.
1 parent c4306ad commit 62301af

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Assets/Tests/InputSystem/Plugins/InputForUITests.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -554,11 +554,8 @@ public void ActionsWithoutUIMap_ShouldNotGenerateWarnings()
554554
public void ActionsWithUIMap_MissingActions_ShouldGenerateWarnings()
555555
{
556556
var asset = ProjectWideActionsAsset.CreateDefaultAssetAtPath(kAssetPath);
557-
var uiActionMap = asset.FindActionMap("UI", true);
558-
for (int i = uiActionMap.m_Actions.Length - 1; i >= 0; i--)
559-
{
560-
ArrayHelpers.EraseAt(ref uiActionMap.m_Actions, uiActionMap.m_Actions.Length - 1);
561-
}
557+
asset.RemoveActionMap(asset.FindActionMap("UI", throwIfNotFound: true));
558+
asset.AddActionMap(new InputActionMap("UI")); // An empty UI map should log warnings.
562559

563560
InputSystem.s_Manager.actions = asset;
564561
Update();

0 commit comments

Comments
 (0)