private void Update() { if (leftHandDevice == default) { leftHandDevice = GetHand(InputDeviceCharacteristics.Left); if (leftHandDevice != default) { leftHand = new VRControllerInputValues(leftHandDevice); hands.Add(HorizontalSide.left, leftHand); } } else { leftHand.Update(); } if (rightHandDevice == default) { rightHandDevice = GetHand(InputDeviceCharacteristics.Right); if (rightHandDevice != default) { rightHand = new VRControllerInputValues(rightHandDevice); hands.Add(HorizontalSide.right, rightHand); } } else { rightHand.Update(); } }
protected override void SingletonAwake() { leftHandDevice = GetHand(InputDeviceCharacteristics.Left); if (leftHandDevice != default) { leftHand = new VRControllerInputValues(leftHandDevice); hands.Add(HorizontalSide.left, leftHand); } rightHandDevice = GetHand(InputDeviceCharacteristics.Right); if (rightHandDevice != default) { rightHand = new VRControllerInputValues(rightHandDevice); hands.Add(HorizontalSide.right, rightHand); } }