iOSSupport.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. #if UNITY_EDITOR || UNITY_IOS || UNITY_TVOS
  2. using UnityEngine.InputSystem.Layouts;
  3. namespace UnityEngine.InputSystem.iOS
  4. {
  5. #if UNITY_DISABLE_DEFAULT_INPUT_PLUGIN_INITIALIZATION
  6. public
  7. #else
  8. internal
  9. #endif
  10. static class iOSSupport
  11. {
  12. public static void Initialize()
  13. {
  14. InputSystem.RegisterLayout<iOSGameController>("iOSGameController",
  15. matches: new InputDeviceMatcher()
  16. .WithInterface("iOS")
  17. .WithDeviceClass("iOSGameController"));
  18. InputSystem.RegisterLayout<XboxOneGampadiOS>("XboxOneGampadiOS",
  19. matches: new InputDeviceMatcher()
  20. .WithInterface("iOS")
  21. .WithDeviceClass("iOSGameController")
  22. .WithProduct("Xbox Wireless Controller"));
  23. InputSystem.RegisterLayout<DualShock4GampadiOS>("DualShock4GampadiOS",
  24. matches: new InputDeviceMatcher()
  25. .WithInterface("iOS")
  26. .WithDeviceClass("iOSGameController")
  27. .WithProduct("DUALSHOCK 4 Wireless Controller"));
  28. }
  29. }
  30. }
  31. #endif // UNITY_EDITOR || UNITY_IOS || UNITY_TVOS