Skip to content

Commit d11eb7f

Browse files
committed
Nintendo Support
1 parent 3ba9541 commit d11eb7f

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.1.3] - 2024-08-15
9+
10+
### Changed
11+
12+
- Gamepad platform now works properly with Nintendo Switch.
13+
14+
815
## [1.1.2] - 2023-08-10
916

1017
### Fixed

Runtime/Scripts/InputUtilities.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ public static class InputUtilities
1313

1414
public static GamepadPlatform GetGamepadPlatform()
1515
{
16+
#if UNITY_SWITCH
17+
return GamepadPlatform.Nintendo;
18+
#endif
19+
1620
if (!IsUsingGamepad()) return GamepadPlatform.None;
1721

1822
var gamepad = GetCurrentGamepad();
1923
return gamepad switch
2024
{
2125
DualShockGamepad => GamepadPlatform.Playstation,
22-
#if UNITY_EDITOR || UNITY_SWITCH || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_WSA
26+
#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_WSA
2327
SwitchProControllerHID => GamepadPlatform.Nintendo, // Switch Pro Controller is not supported on Linux.
2428
#endif
2529
_ => GamepadPlatform.Xbox

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.dartcore.utilities",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"displayName": "DartCore Utilities",
55
"description": "This package contains methods to handle commonly required stuff.",
66
"unity": "2018.1",

0 commit comments

Comments
 (0)