SW 중심대학 OSS GIT 서버 박건태, 이승준, 고기완, 이준호 새로운 배포
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
920 B

4 years ago
  1. #if UNITY_INPUT_SYSTEM
  2. using UnityEngine.InputSystem;
  3. using UnityEngine.InputSystem.Layouts;
  4. using UnityEngine.InputSystem.XR;
  5. using UnityEngine.XR;
  6. using UnityEngine.XR.ARSubsystems;
  7. using Inputs = UnityEngine.InputSystem.InputSystem;
  8. #if UNITY_EDITOR
  9. using UnityEditor;
  10. #endif
  11. namespace UnityEngine.XR.ARKit
  12. {
  13. #if UNITY_EDITOR
  14. [InitializeOnLoad]
  15. #endif
  16. public class InputLayoutLoader
  17. {
  18. #if UNITY_EDITOR
  19. static InputLayoutLoader()
  20. {
  21. RegisterLayouts();
  22. }
  23. #endif
  24. [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
  25. static void RegisterLayouts()
  26. {
  27. Inputs.RegisterLayout<HandheldARInputDevice>(
  28. matches: new InputDeviceMatcher()
  29. .WithInterface(XRUtilities.InterfaceMatchAnyVersion)
  30. .WithProduct("(ARKit)")
  31. );
  32. }
  33. }
  34. }
  35. #endif