Skip to content

Commit 95e65a6

Browse files
committed
Change SupportedControllerType to flags
1 parent 725c31b commit 95e65a6

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4+
using System;
5+
46
namespace Microsoft.MixedReality.Toolkit.Input
57
{
68
// todo: remove this.... it requires customization to add new device types
@@ -9,20 +11,20 @@ namespace Microsoft.MixedReality.Toolkit.Input
911
/// The SDKType lists the XR SDKs that are supported by the Mixed Reality Toolkit.
1012
/// Initially, this lists proposed SDKs, not all may be implemented at this time (please see ReleaseNotes for more details)
1113
/// </summary>
14+
[Flags]
1215
public enum SupportedControllerType
1316
{
14-
None = 0,
15-
GenericOpenVR,
16-
ViveWand,
17-
ViveKnuckles,
18-
OculusTouch,
19-
OculusRemote,
20-
WindowsMixedReality,
21-
GenericUnity,
22-
Xbox,
23-
TouchScreen,
24-
Mouse,
25-
ArticulatedHand,
26-
GGVHand
17+
GenericOpenVR = 1 << 0,
18+
ViveWand = 1 << 1,
19+
ViveKnuckles = 1 << 2,
20+
OculusTouch = 1 << 3,
21+
OculusRemote = 1 << 4,
22+
WindowsMixedReality = 1 << 5,
23+
GenericUnity = 1 << 6,
24+
Xbox = 1 << 7,
25+
TouchScreen = 1 << 8,
26+
Mouse = 1 << 9,
27+
ArticulatedHand = 1 << 10,
28+
GGVHand = 1 << 11
2729
}
2830
}

Assets/MixedRealityToolkit/Definitions/InputSystem/PointerOption.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public PointerOption(SupportedControllerType controllerType, Handedness handedne
2626
this.pointerPrefab = pointerPrefab;
2727
}
2828

29+
[EnumFlags]
2930
[SerializeField]
3031
[Tooltip("The controller this pointer will attach itself to at runtime.")]
3132
private SupportedControllerType controllerType;

0 commit comments

Comments
 (0)