Skip to content

Commit 92fb39b

Browse files
author
Rene Damm
authored
NEW: Add sample with components for visualizing control and action activity (#754).
1 parent bbd15b2 commit 92fb39b

File tree

58 files changed

+6444
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+6444
-169
lines changed

.yamato/upm-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ platforms:
4343
image: {{ platform.image }}
4444
flavor: {{ platform.flavor}}
4545
commands:
46+
- mv ./Assets/Samples ./Packages/com.unity.inputsystem
47+
- mv ./Assets/Samples.meta ./Packages/com.unity.inputsystem
4648
- npm install upm-ci-utils@stable -g --registry https://api.bintray.com/npm/unity/unity-npm
4749
- upm-ci package pack --package-path ./Packages/com.unity.inputsystem/
4850
- upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u {{ editor.version }}

Assets/Demo/SimpleDemo/SimpleController_UsingEvents.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ public class SimpleController_UsingEvents : MonoBehaviour
1616
public void OnEnable()
1717
{
1818
InputSystem.onEvent +=
19-
eventPtr =>
19+
(eventPtr, device) =>
2020
{
21-
var gamepad = InputSystem.GetDeviceById(eventPtr.deviceId) as Gamepad;
21+
var gamepad = device as Gamepad;
2222
if (gamepad == null)
2323
return;
2424

Assets/Samples.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Samples/VisualizerSamples.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"displayName": "Visualizer Samples",
3+
"description": "Examples for setting up input control and action visualizations."
4+
}

0 commit comments

Comments
 (0)