Maze / Library /PackageCache /com.unity.inputsystem@1.6.1 /InputSystem /Plugins /XR /Devices /GoogleVR.cs
| // ENABLE_VR is not defined on Game Core but the assembly is available with limited features when the XR module is enabled. | |
| // Docs generation is skipped because these are intended to be replaced with the com.unity.xr.googlevr package. | |
| using UnityEngine.InputSystem.Controls; | |
| using UnityEngine.InputSystem.Layouts; | |
| using UnityEngine.InputSystem.XR; | |
| namespace Unity.XR.GoogleVr | |
| { | |
| /// <summary> | |
| /// A head-mounted display powered by Google Daydream. | |
| /// </summary> | |
| [] | |
| public class DaydreamHMD : XRHMD | |
| { | |
| } | |
| /// <summary> | |
| /// An XR controller powered by Google Daydream. | |
| /// </summary> | |
| [] { "LeftHand", "RightHand" }, hideInUI = true)] | |
| public class DaydreamController : XRController | |
| { | |
| [] | |
| public Vector2Control touchpad { get; private set; } | |
| [] | |
| public ButtonControl volumeUp { get; private set; } | |
| [] | |
| public ButtonControl recentered { get; private set; } | |
| [] | |
| public ButtonControl volumeDown { get; private set; } | |
| [] | |
| public ButtonControl recentering { get; private set; } | |
| [] | |
| public ButtonControl app { get; private set; } | |
| [] | |
| public ButtonControl home { get; private set; } | |
| [] | |
| public ButtonControl touchpadClicked { get; private set; } | |
| [] | |
| public ButtonControl touchpadTouched { get; private set; } | |
| [] | |
| public Vector3Control deviceVelocity { get; private set; } | |
| [] | |
| public Vector3Control deviceAcceleration { get; private set; } | |
| protected override void FinishSetup() | |
| { | |
| base.FinishSetup(); | |
| touchpad = GetChildControl<Vector2Control>("touchpad"); | |
| volumeUp = GetChildControl<ButtonControl>("volumeUp"); | |
| recentered = GetChildControl<ButtonControl>("recentered"); | |
| volumeDown = GetChildControl<ButtonControl>("volumeDown"); | |
| recentering = GetChildControl<ButtonControl>("recentering"); | |
| app = GetChildControl<ButtonControl>("app"); | |
| home = GetChildControl<ButtonControl>("home"); | |
| touchpadClicked = GetChildControl<ButtonControl>("touchpadClicked"); | |
| touchpadTouched = GetChildControl<ButtonControl>("touchpadTouched"); | |
| deviceVelocity = GetChildControl<Vector3Control>("deviceVelocity"); | |
| deviceAcceleration = GetChildControl<Vector3Control>("deviceAcceleration"); | |
| } | |
| } | |
| } | |