InputDeviceHand.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Runtime.InteropServices;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using UnityEngine;
  9. namespace SC.XR.Unity.Module_InputSystem.InputDeviceHand {
  10. public class InputDeviceHand : InputDeviceBase {
  11. [Header("Show Hands Information")]
  12. public bool ShowHandsInfo = false;
  13. public TextMesh handsText;
  14. [Header("Enable Hands")]
  15. public bool LeftHandOpen = true;
  16. public bool RightHandOpen = true;
  17. [SerializeField]
  18. private bool EditorHideRight = true;
  19. public override InputDeviceType inputDeviceType {
  20. get {
  21. return InputDeviceType.UnKnow;
  22. }
  23. }
  24. protected override void InputDeviceStart() {
  25. SetActiveInputDevicePart(InputDevicePartType.HandLeft, true);
  26. #if !UNITY_EDITOR
  27. SetActiveInputDevicePart(InputDevicePartType.HandRight, true);
  28. #else
  29. SetActiveInputDevicePart(InputDevicePartType.HandRight, true);
  30. #endif
  31. }
  32. }
  33. }