You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Packages/com.unity.inputsystem/InputSystem/Plugins/XR/XRSupport.cs
+60-7Lines changed: 60 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,10 @@ public static class XRUtilities
30
30
}
31
31
32
32
// Sync to UnityXRInputFeatureType in IUnityXRInput.h
33
-
enumFeatureType
33
+
/// <summary>
34
+
/// The type of data a <see cref="XRFeatureDescriptor>"/> exposes.
35
+
/// </summary>
36
+
publicenumFeatureType
34
37
{
35
38
Custom=0,
36
39
Binary,
@@ -44,45 +47,95 @@ enum FeatureType
44
47
Eyes
45
48
}
46
49
47
-
// These structures are not explicitly assigned, but they are filled in via JSON serialization coming from matching structs in native.
50
+
/// <summary>
51
+
/// Contextual strings that identify the contextual, cross-platform use that a feature represents. <see cref="UnityEngine.XR.CommonUsages"/> for a list of unity's built-in shared usages.
52
+
/// </summary>
48
53
#pragma warning disable 0649
49
54
[Serializable]
50
-
structUsageHint
55
+
publicstructUsageHint
51
56
{
52
57
publicstringcontent;
53
58
}
54
59
55
60
//Sync to XRInputFeatureDefinition in XRInputDeviceDefinition.h
61
+
/// <summary>
62
+
/// Describes an individual input on a device, such as a trackpad, or button, or trigger.
63
+
/// </summary>
56
64
[Serializable]
57
-
structXRFeatureDescriptor
65
+
publicstructXRFeatureDescriptor
58
66
{
67
+
/// <summary>
68
+
/// The name of the feature.
69
+
/// </summary>
59
70
publicstringname;
71
+
/// <summary>
72
+
/// The uses that this feature should represent, such as trigger, or grip, or touchpad.
73
+
/// </summary>
60
74
publicList<UsageHint>usageHints;
75
+
/// <summary>
76
+
/// The type of data this feature exposes.
77
+
/// </summary>
61
78
publicFeatureTypefeatureType;
79
+
/// <summary>
80
+
/// The overall size of the feature. This is only filled in when the <see cref="XRFeatureDescriptor.featureType"/> is <see cref="FeatureType.Custom"/>.
81
+
/// </summary>
62
82
publicuintcustomSize;
63
83
}
64
84
65
85
//Sync to XRInputDeviceDefinition in XRInputDeviceDefinition.h
86
+
/// <summary>
87
+
/// Describes an input device: what it can do and how it should be used. These are reported during device connection, and help identify devices and map input data to the right controls.
88
+
/// </summary>
66
89
[Serializable]
67
-
classXRDeviceDescriptor
90
+
publicclassXRDeviceDescriptor
68
91
{
92
+
/// <summary>
93
+
/// The name of the device.
94
+
/// </summary>
69
95
publicstringdeviceName;
96
+
/// <summary>
97
+
/// The manufacturer of the device.
98
+
/// </summary>
70
99
publicstringmanufacturer;
100
+
/// <summary>
101
+
/// The serial number of the device. An empty string if no serial number is available.
102
+
/// </summary>
71
103
publicstringserialNumber;
72
104
#if UNITY_2019_3_OR_NEWER
105
+
/// <summary>
106
+
/// The capabilities of the device, used to help filter and identify devices that server a certain purpose (e.g. controller, or headset, or hardware tracker).
107
+
/// </summary>
73
108
publicInputDeviceCharacteristicscharacteristics;
74
109
#else //UNITY_2019_3_OR_NEWER
110
+
/// <summary>
111
+
/// The role of the device, used to help filter and identify devices that server a certain purpose (e.g. controller, or headset, or hardware tracker).
112
+
/// </summary>
75
113
publicInputDeviceRoledeviceRole;
76
114
#endif //UNITY_2019_3_OR_NEWER
115
+
/// <summary>
116
+
/// The underlying deviceId, this can be used with <see cref="UnityEngine.XR.InputDevices"/> to create a device.
117
+
/// </summary>
77
118
publicintdeviceId;
119
+
/// <summary>
120
+
/// A list of all input features. <seealso cref="XRFeatureDescriptor"/>
0 commit comments