Skip to content

Commit

Permalink
1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
yboumaiza7 committed Nov 14, 2024
1 parent 11ae355 commit a66947a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.vs/
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Inputs-Manager
A new customizable and dynamic Input alternative for Unity based on the New Input System.

**Version:** 1.1.4
**Version:** 1.1.5

## Features
- High-performant code (Using C# Jobs System & Burst)
Expand Down Expand Up @@ -62,6 +62,8 @@ You can access the Inputs Manager API from the `Utilities.Inputs` namespace.
- Input System: 1.7.0 or newer

## Release Notes
- 1.1.5
- Fixed gamepads detection
- 1.1.4
- Updated obsolete code
- 1.1.3
Expand Down
8 changes: 4 additions & 4 deletions Scripts/InputsManager/Runtime/Managed/InputsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public static string[] GamepadNames
get
{
if (gamepadNames == null || gamepadNames.Length != gamepadsCount)
gamepadNames = Gamepad.all.Select(gamepad => gamepad.name).ToArray();
gamepadNames = Gamepads.Select(gamepad => gamepad.name).ToArray();

return gamepadNames;
}
Expand Down Expand Up @@ -513,19 +513,19 @@ public static bool AnyInputPress(bool ignoreMouse = false)
{
CheckStarted();

return keyboard != null && keyboard.anyKey.isPressed || !ignoreMouse && InputMouseAnyButtonPress() || gamepads.Any(gamepad => gamepad.allControls.Any(control => control is ButtonControl button && !button.synthetic && button.isPressed));
return keyboard != null && keyboard.anyKey.isPressed || !ignoreMouse && InputMouseAnyButtonPress() || gamepads != null && gamepads.Any(gamepad => gamepad.allControls.Any(control => control is ButtonControl button && !button.synthetic && button.isPressed));
}
public static bool AnyInputDown(bool ignoreMouse = false)
{
CheckStarted();

return keyboard != null && keyboard.anyKey.wasPressedThisFrame || !ignoreMouse && InputMouseAnyButtonDown() || gamepads.Any(gamepad => gamepad.allControls.Any(control => control is ButtonControl button && !button.synthetic && button.wasPressedThisFrame));
return keyboard != null && keyboard.anyKey.wasPressedThisFrame || !ignoreMouse && InputMouseAnyButtonDown() || gamepads != null && gamepads.Any(gamepad => gamepad.allControls.Any(control => control is ButtonControl button && !button.synthetic && button.wasPressedThisFrame));
}
public static bool AnyInputUp(bool ignoreMouse = false)
{
CheckStarted();

return keyboard != null && keyboard.anyKey.wasReleasedThisFrame || !ignoreMouse && InputMouseAnyButtonUp() || gamepads.Any(gamepad => gamepad.allControls.Any(control => control is ButtonControl button && !button.synthetic && button.wasReleasedThisFrame));
return keyboard != null && keyboard.anyKey.wasReleasedThisFrame || !ignoreMouse && InputMouseAnyButtonUp() || gamepads != null && gamepads.Any(gamepad => gamepad.allControls.Any(control => control is ButtonControl button && !button.synthetic && button.wasReleasedThisFrame));
}

public static bool InputPress(Input input, int gamepadIndex = 0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"displayName": "Inputs Manager",
"name": "dev.bxbstudio.inputs-manager",
"description": "A simple and customization input alternative for Unity based on the New Input System.",
"version": "1.1.4",
"version": "1.1.5",
"unity": "2020.3",
"unityRelease": "17f1",
"dependencies": {
Expand Down

0 comments on commit a66947a

Please sign in to comment.