-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from eviltwo/supported-control-components
Supported control components
- Loading branch information
Showing
12 changed files
with
165 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
UnitySteamInputAdapter/Assets/UnitySteamInputAdapter/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 17 additions & 22 deletions
39
UnitySteamInputAdapter/Assets/UnitySteamInputAdapter/Scripts/Utils/InputSystemUtility.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
UnitySteamInputAdapter/Assets/UnitySteamInputAdapter/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
UnitySteamInputAdapter/Assets/UnitySteamInputAdapterTest.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
UnitySteamInputAdapter/Assets/UnitySteamInputAdapterTest/Scripts.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
UnitySteamInputAdapter/Assets/UnitySteamInputAdapterTest/Scripts/InputSystemUtilityTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using NUnit.Framework; | ||
using UnityEngine; | ||
using UnitySteamInputAdapter.Utils; | ||
|
||
namespace UnitySteamInputAdapterTest | ||
{ | ||
public class InputSystemUtilityTest : MonoBehaviour | ||
{ | ||
[TestCase("/XInputController/buttonSouth", "buttonSouth")] | ||
[TestCase("/XInputController/dpad/right", "dpad/right")] | ||
[TestCase("/XInputController/<Button>", "<Button>")] | ||
[TestCase("/XInputController/{Submit}", "{Submit}")] | ||
[TestCase("/XInputController/#(a)", "#(a)")] | ||
[TestCase("/<Gamepad>/buttonSouth", "buttonSouth")] | ||
[TestCase("/<Gamepad>/buttonSouth", "buttonSouth")] | ||
[TestCase("XInputController/buttonSouth", "buttonSouth")] | ||
[TestCase("*/buttonSouth", "buttonSouth")] | ||
public void RemoveRootFromPath(string input, string expected) | ||
{ | ||
var result = InputSystemUtility.RemoveRootFromPath(input); | ||
Assert.AreEqual(expected, result); | ||
} | ||
|
||
[TestCase("/XInputController/buttonSouth", false)] | ||
[TestCase("/XInputController/dpad/right", false)] | ||
[TestCase("/XInputController/<Button>", true)] | ||
[TestCase("/XInputController/{Submit}", true)] | ||
[TestCase("/XInputController/#(a)", true)] | ||
public void HasPathComponent(string input, bool expected) | ||
{ | ||
var result = InputSystemUtility.HasPathComponent(input); | ||
Assert.AreEqual(expected, result); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...teamInputAdapter/Assets/UnitySteamInputAdapterTest/Scripts/InputSystemUtilityTest.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
...mInputAdapter/Assets/UnitySteamInputAdapterTest/Scripts/UnitySteamInputAdapterTest.asmdef
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "UnitySteamInputAdapterTest", | ||
"rootNamespace": "", | ||
"references": [ | ||
"GUID:75469ad4d38634e559750d17036d5f7c", | ||
"GUID:51a288164b64a274ca0e204a55cf0945" | ||
], | ||
"includePlatforms": [ | ||
"Editor" | ||
], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": false, | ||
"defineConstraints": [], | ||
"versionDefines": [], | ||
"noEngineReferences": false | ||
} |
7 changes: 7 additions & 0 deletions
7
...tAdapter/Assets/UnitySteamInputAdapterTest/Scripts/UnitySteamInputAdapterTest.asmdef.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.