HandheldARInputDevice.cs
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#if UNITY_INPUT_SYSTEM
using UnityEngine.Scripting;
using UnityEngine.InputSystem.Controls;
using UnityEngine.InputSystem.Layouts;
namespace UnityEngine.XR.ARSubsystems
{
/// <summary>
/// A Handheld AR device layout, for use with the Input System, representing a mobile AR device.
/// </summary>
[Preserve]
[InputControlLayout]
public class HandheldARInputDevice : UnityEngine.InputSystem.InputDevice
{
/// <summary>
/// The position in 3D space of the device.
/// </summary>
[Preserve]
[InputControl]
public Vector3Control devicePosition { get; private set; }
/// <summary>
/// The rotation in 3D space of the device.
/// </summary>
[Preserve]
[InputControl]
public QuaternionControl deviceRotation { get; private set; }
protected override void FinishSetup()
{
base.FinishSetup();
devicePosition = GetChildControl<Vector3Control>("devicePosition");
deviceRotation = GetChildControl<QuaternionControl>("deviceRotation");
}
}
}
#endif