No Description
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.

AndroidAxis.cs 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. #if UNITY_EDITOR || UNITY_ANDROID || PACKAGE_DOCS_GENERATION
  2. using System;
  3. using System.Linq;
  4. using System.Runtime.InteropServices;
  5. using UnityEngine.InputSystem.Android.LowLevel;
  6. using UnityEngine.InputSystem.Utilities;
  7. namespace UnityEngine.InputSystem.Android.LowLevel
  8. {
  9. /// <summary>
  10. /// Enum used to identity the axis type in the Android motion input event. See <see cref="AndroidGameControllerState.axis"/>.
  11. /// See https://developer.android.com/reference/android/view/MotionEvent#constants_1 for more details.
  12. /// </summary>
  13. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags", Justification = "False positive")]
  14. public enum AndroidAxis
  15. {
  16. /// <summary>
  17. /// X axis of a motion event.
  18. /// </summary>
  19. X = 0,
  20. /// <summary>
  21. /// Y axis of a motion event.
  22. /// </summary>
  23. Y = 1,
  24. /// <summary>
  25. /// Pressure axis of a motion event.
  26. /// </summary>
  27. Pressure = 2,
  28. /// <summary>
  29. /// Size axis of a motion event.
  30. /// </summary>
  31. Size = 3,
  32. /// <summary>
  33. /// TouchMajor axis of a motion event.
  34. /// </summary>
  35. TouchMajor = 4,
  36. /// <summary>
  37. /// TouchMinor axis of a motion event.
  38. /// </summary>
  39. TouchMinor = 5,
  40. /// <summary>
  41. /// ToolMajor axis of a motion event.
  42. /// </summary>
  43. ToolMajor = 6,
  44. /// <summary>
  45. /// ToolMinor axis of a motion event.
  46. /// </summary>
  47. ToolMinor = 7,
  48. /// <summary>
  49. /// Orientation axis of a motion event.
  50. /// </summary>
  51. Orientation = 8,
  52. /// <summary>
  53. /// Vertical Scroll of a motion event.
  54. /// </summary>
  55. Vscroll = 9,
  56. /// <summary>
  57. /// Horizontal Scroll axis of a motion event.
  58. /// </summary>
  59. Hscroll = 10,
  60. /// <summary>
  61. /// Z axis of a motion event.
  62. /// </summary>
  63. Z = 11,
  64. /// <summary>
  65. /// X Rotation axis of a motion event.
  66. /// </summary>
  67. Rx = 12,
  68. /// <summary>
  69. /// Y Rotation axis of a motion event.
  70. /// </summary>
  71. Ry = 13,
  72. /// <summary>
  73. /// Z Rotation axis of a motion event.
  74. /// </summary>
  75. Rz = 14,
  76. /// <summary>
  77. /// Hat X axis of a motion event.
  78. /// </summary>
  79. HatX = 15,
  80. /// <summary>
  81. /// Hat Y axis of a motion event.
  82. /// </summary>
  83. HatY = 16,
  84. /// <summary>
  85. /// Left Trigger axis of a motion event.
  86. /// </summary>
  87. Ltrigger = 17,
  88. /// <summary>
  89. /// Right Trigger axis of a motion event.
  90. /// </summary>
  91. Rtrigger = 18,
  92. /// <summary>
  93. /// Throttle axis of a motion event.
  94. /// </summary>
  95. Throttle = 19,
  96. /// <summary>
  97. /// Rudder axis of a motion event.
  98. /// </summary>
  99. Rudder = 20,
  100. /// <summary>
  101. /// Wheel axis of a motion event.
  102. /// </summary>
  103. Wheel = 21,
  104. /// <summary>
  105. /// Gas axis of a motion event.
  106. /// </summary>
  107. Gas = 22,
  108. /// <summary>
  109. /// Break axis of a motion event.
  110. /// </summary>
  111. Brake = 23,
  112. /// <summary>
  113. /// Distance axis of a motion event.
  114. /// </summary>
  115. Distance = 24,
  116. /// <summary>
  117. /// Tilt axis of a motion event.
  118. /// </summary>
  119. Tilt = 25,
  120. /// <summary>
  121. /// Generic 1 axis of a motion event.
  122. /// </summary>
  123. Generic1 = 32,
  124. /// <summary>
  125. /// Generic 2 axis of a motion event.
  126. /// </summary>
  127. Generic2 = 33,
  128. /// <summary>
  129. /// Generic 3 axis of a motion event.
  130. /// </summary>
  131. Generic3 = 34,
  132. /// <summary>
  133. /// Generic 4 axis of a motion event.
  134. /// </summary>
  135. Generic4 = 35,
  136. /// <summary>
  137. /// Generic 5 axis of a motion event.
  138. /// </summary>
  139. Generic5 = 36,
  140. /// <summary>
  141. /// Generic 6 axis of a motion event.
  142. /// </summary>
  143. Generic6 = 37,
  144. /// <summary>
  145. /// Generic 7 axis of a motion event.
  146. /// </summary>
  147. Generic7 = 38,
  148. /// <summary>
  149. /// Generic 8 axis of a motion event.
  150. /// </summary>
  151. Generic8 = 39,
  152. /// <summary>
  153. /// Generic 9 axis of a motion event.
  154. /// </summary>
  155. Generic9 = 40,
  156. /// <summary>
  157. /// Generic 10 axis of a motion event.
  158. /// </summary>
  159. Generic10 = 41,
  160. /// <summary>
  161. /// Generic 11 axis of a motion event.
  162. /// </summary>
  163. Generic11 = 42,
  164. /// <summary>
  165. /// Generic 12 axis of a motion event.
  166. /// </summary>
  167. Generic12 = 43,
  168. /// <summary>
  169. /// Generic 13 axis of a motion event.
  170. /// </summary>
  171. Generic13 = 44,
  172. /// <summary>
  173. /// Generic 14 axis of a motion event.
  174. /// </summary>
  175. Generic14 = 45,
  176. /// <summary>
  177. /// Generic 15 axis of a motion event.
  178. /// </summary>
  179. Generic15 = 46,
  180. /// <summary>
  181. /// Generic 16 axis of a motion event.
  182. /// </summary>
  183. Generic16 = 47,
  184. }
  185. }
  186. #endif // UNITY_EDITOR || UNITY_ANDROID