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.

DefaultInputActions.cs 50KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine.InputSystem.Utilities;
  5. // NOTE: This is mostly auto-generated from DefaultInput.actions. To regenerate, temporarily toggle on "Generate C# Class" and
  6. // merge revision from version control.
  7. // CodeAnalyzer isn't happy with our implicit conversion operator. Might be something to fix but even then, fix relates to
  8. // code generator, not the generated code here.
  9. #pragma warning disable CA2225
  10. namespace UnityEngine.InputSystem
  11. {
  12. /// <summary>
  13. /// A default <see cref="InputAction"/> setup.
  14. /// </summary>
  15. /// <remarks>
  16. /// This class is auto-generated from the <c>DefaultAction.inputactions</c> asset that comes with the Input System.
  17. ///
  18. /// <example>
  19. /// <code>
  20. /// // Instantiate the default action set.
  21. /// var actions = new DefaultInputActions();
  22. ///
  23. /// // One way to use the actions:
  24. /// actions.Player.Enable();
  25. /// actions.Player.Fire.performed += _ => Fire();
  26. /// // Or:
  27. /// if (actions.Player.Fire.WasPressedThisFrame())
  28. /// Fire();
  29. ///
  30. /// // Another way is with PlayerInput, for example:
  31. /// var playerInput = AddComponent&lt;PlayerInput&gt;();
  32. /// playerInput.actions = actions.asset;
  33. /// </code>
  34. /// </example>
  35. /// </remarks>
  36. public class DefaultInputActions : IInputActionCollection2, IDisposable
  37. {
  38. public InputActionAsset asset { get; }
  39. public @DefaultInputActions()
  40. {
  41. asset = InputActionAsset.FromJson(@"{
  42. ""name"": ""DefaultInputActions"",
  43. ""maps"": [
  44. {
  45. ""name"": ""Player"",
  46. ""id"": ""df70fa95-8a34-4494-b137-73ab6b9c7d37"",
  47. ""actions"": [
  48. {
  49. ""name"": ""Move"",
  50. ""type"": ""Value"",
  51. ""id"": ""351f2ccd-1f9f-44bf-9bec-d62ac5c5f408"",
  52. ""expectedControlType"": ""Vector2"",
  53. ""processors"": """",
  54. ""interactions"": """",
  55. ""initialStateCheck"": true
  56. },
  57. {
  58. ""name"": ""Look"",
  59. ""type"": ""Value"",
  60. ""id"": ""6b444451-8a00-4d00-a97e-f47457f736a8"",
  61. ""expectedControlType"": ""Vector2"",
  62. ""processors"": """",
  63. ""interactions"": """",
  64. ""initialStateCheck"": true
  65. },
  66. {
  67. ""name"": ""Fire"",
  68. ""type"": ""Button"",
  69. ""id"": ""6c2ab1b8-8984-453a-af3d-a3c78ae1679a"",
  70. ""expectedControlType"": ""Button"",
  71. ""processors"": """",
  72. ""interactions"": """",
  73. ""initialStateCheck"": false
  74. }
  75. ],
  76. ""bindings"": [
  77. {
  78. ""name"": """",
  79. ""id"": ""978bfe49-cc26-4a3d-ab7b-7d7a29327403"",
  80. ""path"": ""<Gamepad>/leftStick"",
  81. ""interactions"": """",
  82. ""processors"": """",
  83. ""groups"": "";Gamepad"",
  84. ""action"": ""Move"",
  85. ""isComposite"": false,
  86. ""isPartOfComposite"": false
  87. },
  88. {
  89. ""name"": ""WASD"",
  90. ""id"": ""00ca640b-d935-4593-8157-c05846ea39b3"",
  91. ""path"": ""Dpad"",
  92. ""interactions"": """",
  93. ""processors"": """",
  94. ""groups"": """",
  95. ""action"": ""Move"",
  96. ""isComposite"": true,
  97. ""isPartOfComposite"": false
  98. },
  99. {
  100. ""name"": ""up"",
  101. ""id"": ""e2062cb9-1b15-46a2-838c-2f8d72a0bdd9"",
  102. ""path"": ""<Keyboard>/w"",
  103. ""interactions"": """",
  104. ""processors"": """",
  105. ""groups"": "";Keyboard&Mouse"",
  106. ""action"": ""Move"",
  107. ""isComposite"": false,
  108. ""isPartOfComposite"": true
  109. },
  110. {
  111. ""name"": ""up"",
  112. ""id"": ""8180e8bd-4097-4f4e-ab88-4523101a6ce9"",
  113. ""path"": ""<Keyboard>/upArrow"",
  114. ""interactions"": """",
  115. ""processors"": """",
  116. ""groups"": "";Keyboard&Mouse"",
  117. ""action"": ""Move"",
  118. ""isComposite"": false,
  119. ""isPartOfComposite"": true
  120. },
  121. {
  122. ""name"": ""down"",
  123. ""id"": ""320bffee-a40b-4347-ac70-c210eb8bc73a"",
  124. ""path"": ""<Keyboard>/s"",
  125. ""interactions"": """",
  126. ""processors"": """",
  127. ""groups"": "";Keyboard&Mouse"",
  128. ""action"": ""Move"",
  129. ""isComposite"": false,
  130. ""isPartOfComposite"": true
  131. },
  132. {
  133. ""name"": ""down"",
  134. ""id"": ""1c5327b5-f71c-4f60-99c7-4e737386f1d1"",
  135. ""path"": ""<Keyboard>/downArrow"",
  136. ""interactions"": """",
  137. ""processors"": """",
  138. ""groups"": "";Keyboard&Mouse"",
  139. ""action"": ""Move"",
  140. ""isComposite"": false,
  141. ""isPartOfComposite"": true
  142. },
  143. {
  144. ""name"": ""left"",
  145. ""id"": ""d2581a9b-1d11-4566-b27d-b92aff5fabbc"",
  146. ""path"": ""<Keyboard>/a"",
  147. ""interactions"": """",
  148. ""processors"": """",
  149. ""groups"": "";Keyboard&Mouse"",
  150. ""action"": ""Move"",
  151. ""isComposite"": false,
  152. ""isPartOfComposite"": true
  153. },
  154. {
  155. ""name"": ""left"",
  156. ""id"": ""2e46982e-44cc-431b-9f0b-c11910bf467a"",
  157. ""path"": ""<Keyboard>/leftArrow"",
  158. ""interactions"": """",
  159. ""processors"": """",
  160. ""groups"": "";Keyboard&Mouse"",
  161. ""action"": ""Move"",
  162. ""isComposite"": false,
  163. ""isPartOfComposite"": true
  164. },
  165. {
  166. ""name"": ""right"",
  167. ""id"": ""fcfe95b8-67b9-4526-84b5-5d0bc98d6400"",
  168. ""path"": ""<Keyboard>/d"",
  169. ""interactions"": """",
  170. ""processors"": """",
  171. ""groups"": "";Keyboard&Mouse"",
  172. ""action"": ""Move"",
  173. ""isComposite"": false,
  174. ""isPartOfComposite"": true
  175. },
  176. {
  177. ""name"": ""right"",
  178. ""id"": ""77bff152-3580-4b21-b6de-dcd0c7e41164"",
  179. ""path"": ""<Keyboard>/rightArrow"",
  180. ""interactions"": """",
  181. ""processors"": """",
  182. ""groups"": "";Keyboard&Mouse"",
  183. ""action"": ""Move"",
  184. ""isComposite"": false,
  185. ""isPartOfComposite"": true
  186. },
  187. {
  188. ""name"": """",
  189. ""id"": ""1635d3fe-58b6-4ba9-a4e2-f4b964f6b5c8"",
  190. ""path"": ""<XRController>/{Primary2DAxis}"",
  191. ""interactions"": """",
  192. ""processors"": """",
  193. ""groups"": ""XR"",
  194. ""action"": ""Move"",
  195. ""isComposite"": false,
  196. ""isPartOfComposite"": false
  197. },
  198. {
  199. ""name"": """",
  200. ""id"": ""3ea4d645-4504-4529-b061-ab81934c3752"",
  201. ""path"": ""<Joystick>/stick"",
  202. ""interactions"": """",
  203. ""processors"": """",
  204. ""groups"": ""Joystick"",
  205. ""action"": ""Move"",
  206. ""isComposite"": false,
  207. ""isPartOfComposite"": false
  208. },
  209. {
  210. ""name"": """",
  211. ""id"": ""c1f7a91b-d0fd-4a62-997e-7fb9b69bf235"",
  212. ""path"": ""<Gamepad>/rightStick"",
  213. ""interactions"": """",
  214. ""processors"": """",
  215. ""groups"": "";Gamepad"",
  216. ""action"": ""Look"",
  217. ""isComposite"": false,
  218. ""isPartOfComposite"": false
  219. },
  220. {
  221. ""name"": """",
  222. ""id"": ""8c8e490b-c610-4785-884f-f04217b23ca4"",
  223. ""path"": ""<Pointer>/delta"",
  224. ""interactions"": """",
  225. ""processors"": """",
  226. ""groups"": "";Keyboard&Mouse;Touch"",
  227. ""action"": ""Look"",
  228. ""isComposite"": false,
  229. ""isPartOfComposite"": false
  230. },
  231. {
  232. ""name"": """",
  233. ""id"": ""3e5f5442-8668-4b27-a940-df99bad7e831"",
  234. ""path"": ""<Joystick>/{Hatswitch}"",
  235. ""interactions"": """",
  236. ""processors"": """",
  237. ""groups"": ""Joystick"",
  238. ""action"": ""Look"",
  239. ""isComposite"": false,
  240. ""isPartOfComposite"": false
  241. },
  242. {
  243. ""name"": """",
  244. ""id"": ""143bb1cd-cc10-4eca-a2f0-a3664166fe91"",
  245. ""path"": ""<Gamepad>/rightTrigger"",
  246. ""interactions"": """",
  247. ""processors"": """",
  248. ""groups"": "";Gamepad"",
  249. ""action"": ""Fire"",
  250. ""isComposite"": false,
  251. ""isPartOfComposite"": false
  252. },
  253. {
  254. ""name"": """",
  255. ""id"": ""05f6913d-c316-48b2-a6bb-e225f14c7960"",
  256. ""path"": ""<Mouse>/leftButton"",
  257. ""interactions"": """",
  258. ""processors"": """",
  259. ""groups"": "";Keyboard&Mouse"",
  260. ""action"": ""Fire"",
  261. ""isComposite"": false,
  262. ""isPartOfComposite"": false
  263. },
  264. {
  265. ""name"": """",
  266. ""id"": ""886e731e-7071-4ae4-95c0-e61739dad6fd"",
  267. ""path"": ""<Touchscreen>/primaryTouch/tap"",
  268. ""interactions"": """",
  269. ""processors"": """",
  270. ""groups"": "";Touch"",
  271. ""action"": ""Fire"",
  272. ""isComposite"": false,
  273. ""isPartOfComposite"": false
  274. },
  275. {
  276. ""name"": """",
  277. ""id"": ""ee3d0cd2-254e-47a7-a8cb-bc94d9658c54"",
  278. ""path"": ""<Joystick>/trigger"",
  279. ""interactions"": """",
  280. ""processors"": """",
  281. ""groups"": ""Joystick"",
  282. ""action"": ""Fire"",
  283. ""isComposite"": false,
  284. ""isPartOfComposite"": false
  285. },
  286. {
  287. ""name"": """",
  288. ""id"": ""8255d333-5683-4943-a58a-ccb207ff1dce"",
  289. ""path"": ""<XRController>/{PrimaryAction}"",
  290. ""interactions"": """",
  291. ""processors"": """",
  292. ""groups"": ""XR"",
  293. ""action"": ""Fire"",
  294. ""isComposite"": false,
  295. ""isPartOfComposite"": false
  296. }
  297. ]
  298. },
  299. {
  300. ""name"": ""UI"",
  301. ""id"": ""272f6d14-89ba-496f-b7ff-215263d3219f"",
  302. ""actions"": [
  303. {
  304. ""name"": ""Navigate"",
  305. ""type"": ""PassThrough"",
  306. ""id"": ""c95b2375-e6d9-4b88-9c4c-c5e76515df4b"",
  307. ""expectedControlType"": ""Vector2"",
  308. ""processors"": """",
  309. ""interactions"": """",
  310. ""initialStateCheck"": false
  311. },
  312. {
  313. ""name"": ""Submit"",
  314. ""type"": ""Button"",
  315. ""id"": ""7607c7b6-cd76-4816-beef-bd0341cfe950"",
  316. ""expectedControlType"": ""Button"",
  317. ""processors"": """",
  318. ""interactions"": """",
  319. ""initialStateCheck"": false
  320. },
  321. {
  322. ""name"": ""Cancel"",
  323. ""type"": ""Button"",
  324. ""id"": ""15cef263-9014-4fd5-94d9-4e4a6234a6ef"",
  325. ""expectedControlType"": ""Button"",
  326. ""processors"": """",
  327. ""interactions"": """",
  328. ""initialStateCheck"": false
  329. },
  330. {
  331. ""name"": ""Point"",
  332. ""type"": ""PassThrough"",
  333. ""id"": ""32b35790-4ed0-4e9a-aa41-69ac6d629449"",
  334. ""expectedControlType"": ""Vector2"",
  335. ""processors"": """",
  336. ""interactions"": """",
  337. ""initialStateCheck"": true
  338. },
  339. {
  340. ""name"": ""Click"",
  341. ""type"": ""PassThrough"",
  342. ""id"": ""3c7022bf-7922-4f7c-a998-c437916075ad"",
  343. ""expectedControlType"": ""Button"",
  344. ""processors"": """",
  345. ""interactions"": """",
  346. ""initialStateCheck"": true
  347. },
  348. {
  349. ""name"": ""ScrollWheel"",
  350. ""type"": ""PassThrough"",
  351. ""id"": ""0489e84a-4833-4c40-bfae-cea84b696689"",
  352. ""expectedControlType"": ""Vector2"",
  353. ""processors"": """",
  354. ""interactions"": """",
  355. ""initialStateCheck"": false
  356. },
  357. {
  358. ""name"": ""MiddleClick"",
  359. ""type"": ""PassThrough"",
  360. ""id"": ""dad70c86-b58c-4b17-88ad-f5e53adf419e"",
  361. ""expectedControlType"": ""Button"",
  362. ""processors"": """",
  363. ""interactions"": """",
  364. ""initialStateCheck"": false
  365. },
  366. {
  367. ""name"": ""RightClick"",
  368. ""type"": ""PassThrough"",
  369. ""id"": ""44b200b1-1557-4083-816c-b22cbdf77ddf"",
  370. ""expectedControlType"": ""Button"",
  371. ""processors"": """",
  372. ""interactions"": """",
  373. ""initialStateCheck"": false
  374. },
  375. {
  376. ""name"": ""TrackedDevicePosition"",
  377. ""type"": ""PassThrough"",
  378. ""id"": ""24908448-c609-4bc3-a128-ea258674378a"",
  379. ""expectedControlType"": ""Vector3"",
  380. ""processors"": """",
  381. ""interactions"": """",
  382. ""initialStateCheck"": false
  383. },
  384. {
  385. ""name"": ""TrackedDeviceOrientation"",
  386. ""type"": ""PassThrough"",
  387. ""id"": ""9caa3d8a-6b2f-4e8e-8bad-6ede561bd9be"",
  388. ""expectedControlType"": ""Quaternion"",
  389. ""processors"": """",
  390. ""interactions"": """",
  391. ""initialStateCheck"": false
  392. }
  393. ],
  394. ""bindings"": [
  395. {
  396. ""name"": ""Gamepad"",
  397. ""id"": ""809f371f-c5e2-4e7a-83a1-d867598f40dd"",
  398. ""path"": ""2DVector"",
  399. ""interactions"": """",
  400. ""processors"": """",
  401. ""groups"": """",
  402. ""action"": ""Navigate"",
  403. ""isComposite"": true,
  404. ""isPartOfComposite"": false
  405. },
  406. {
  407. ""name"": ""up"",
  408. ""id"": ""14a5d6e8-4aaf-4119-a9ef-34b8c2c548bf"",
  409. ""path"": ""<Gamepad>/leftStick/up"",
  410. ""interactions"": """",
  411. ""processors"": """",
  412. ""groups"": "";Gamepad"",
  413. ""action"": ""Navigate"",
  414. ""isComposite"": false,
  415. ""isPartOfComposite"": true
  416. },
  417. {
  418. ""name"": ""up"",
  419. ""id"": ""9144cbe6-05e1-4687-a6d7-24f99d23dd81"",
  420. ""path"": ""<Gamepad>/rightStick/up"",
  421. ""interactions"": """",
  422. ""processors"": """",
  423. ""groups"": "";Gamepad"",
  424. ""action"": ""Navigate"",
  425. ""isComposite"": false,
  426. ""isPartOfComposite"": true
  427. },
  428. {
  429. ""name"": ""down"",
  430. ""id"": ""2db08d65-c5fb-421b-983f-c71163608d67"",
  431. ""path"": ""<Gamepad>/leftStick/down"",
  432. ""interactions"": """",
  433. ""processors"": """",
  434. ""groups"": "";Gamepad"",
  435. ""action"": ""Navigate"",
  436. ""isComposite"": false,
  437. ""isPartOfComposite"": true
  438. },
  439. {
  440. ""name"": ""down"",
  441. ""id"": ""58748904-2ea9-4a80-8579-b500e6a76df8"",
  442. ""path"": ""<Gamepad>/rightStick/down"",
  443. ""interactions"": """",
  444. ""processors"": """",
  445. ""groups"": "";Gamepad"",
  446. ""action"": ""Navigate"",
  447. ""isComposite"": false,
  448. ""isPartOfComposite"": true
  449. },
  450. {
  451. ""name"": ""left"",
  452. ""id"": ""8ba04515-75aa-45de-966d-393d9bbd1c14"",
  453. ""path"": ""<Gamepad>/leftStick/left"",
  454. ""interactions"": """",
  455. ""processors"": """",
  456. ""groups"": "";Gamepad"",
  457. ""action"": ""Navigate"",
  458. ""isComposite"": false,
  459. ""isPartOfComposite"": true
  460. },
  461. {
  462. ""name"": ""left"",
  463. ""id"": ""712e721c-bdfb-4b23-a86c-a0d9fcfea921"",
  464. ""path"": ""<Gamepad>/rightStick/left"",
  465. ""interactions"": """",
  466. ""processors"": """",
  467. ""groups"": "";Gamepad"",
  468. ""action"": ""Navigate"",
  469. ""isComposite"": false,
  470. ""isPartOfComposite"": true
  471. },
  472. {
  473. ""name"": ""right"",
  474. ""id"": ""fcd248ae-a788-4676-a12e-f4d81205600b"",
  475. ""path"": ""<Gamepad>/leftStick/right"",
  476. ""interactions"": """",
  477. ""processors"": """",
  478. ""groups"": "";Gamepad"",
  479. ""action"": ""Navigate"",
  480. ""isComposite"": false,
  481. ""isPartOfComposite"": true
  482. },
  483. {
  484. ""name"": ""right"",
  485. ""id"": ""1f04d9bc-c50b-41a1-bfcc-afb75475ec20"",
  486. ""path"": ""<Gamepad>/rightStick/right"",
  487. ""interactions"": """",
  488. ""processors"": """",
  489. ""groups"": "";Gamepad"",
  490. ""action"": ""Navigate"",
  491. ""isComposite"": false,
  492. ""isPartOfComposite"": true
  493. },
  494. {
  495. ""name"": """",
  496. ""id"": ""fb8277d4-c5cd-4663-9dc7-ee3f0b506d90"",
  497. ""path"": ""<Gamepad>/dpad"",
  498. ""interactions"": """",
  499. ""processors"": """",
  500. ""groups"": "";Gamepad"",
  501. ""action"": ""Navigate"",
  502. ""isComposite"": false,
  503. ""isPartOfComposite"": false
  504. },
  505. {
  506. ""name"": ""Joystick"",
  507. ""id"": ""e25d9774-381c-4a61-b47c-7b6b299ad9f9"",
  508. ""path"": ""2DVector"",
  509. ""interactions"": """",
  510. ""processors"": """",
  511. ""groups"": """",
  512. ""action"": ""Navigate"",
  513. ""isComposite"": true,
  514. ""isPartOfComposite"": false
  515. },
  516. {
  517. ""name"": ""up"",
  518. ""id"": ""3db53b26-6601-41be-9887-63ac74e79d19"",
  519. ""path"": ""<Joystick>/stick/up"",
  520. ""interactions"": """",
  521. ""processors"": """",
  522. ""groups"": ""Joystick"",
  523. ""action"": ""Navigate"",
  524. ""isComposite"": false,
  525. ""isPartOfComposite"": true
  526. },
  527. {
  528. ""name"": ""down"",
  529. ""id"": ""0cb3e13e-3d90-4178-8ae6-d9c5501d653f"",
  530. ""path"": ""<Joystick>/stick/down"",
  531. ""interactions"": """",
  532. ""processors"": """",
  533. ""groups"": ""Joystick"",
  534. ""action"": ""Navigate"",
  535. ""isComposite"": false,
  536. ""isPartOfComposite"": true
  537. },
  538. {
  539. ""name"": ""left"",
  540. ""id"": ""0392d399-f6dd-4c82-8062-c1e9c0d34835"",
  541. ""path"": ""<Joystick>/stick/left"",
  542. ""interactions"": """",
  543. ""processors"": """",
  544. ""groups"": ""Joystick"",
  545. ""action"": ""Navigate"",
  546. ""isComposite"": false,
  547. ""isPartOfComposite"": true
  548. },
  549. {
  550. ""name"": ""right"",
  551. ""id"": ""942a66d9-d42f-43d6-8d70-ecb4ba5363bc"",
  552. ""path"": ""<Joystick>/stick/right"",
  553. ""interactions"": """",
  554. ""processors"": """",
  555. ""groups"": ""Joystick"",
  556. ""action"": ""Navigate"",
  557. ""isComposite"": false,
  558. ""isPartOfComposite"": true
  559. },
  560. {
  561. ""name"": ""Keyboard"",
  562. ""id"": ""ff527021-f211-4c02-933e-5976594c46ed"",
  563. ""path"": ""2DVector"",
  564. ""interactions"": """",
  565. ""processors"": """",
  566. ""groups"": """",
  567. ""action"": ""Navigate"",
  568. ""isComposite"": true,
  569. ""isPartOfComposite"": false
  570. },
  571. {
  572. ""name"": ""up"",
  573. ""id"": ""563fbfdd-0f09-408d-aa75-8642c4f08ef0"",
  574. ""path"": ""<Keyboard>/w"",
  575. ""interactions"": """",
  576. ""processors"": """",
  577. ""groups"": ""Keyboard&Mouse"",
  578. ""action"": ""Navigate"",
  579. ""isComposite"": false,
  580. ""isPartOfComposite"": true
  581. },
  582. {
  583. ""name"": ""up"",
  584. ""id"": ""eb480147-c587-4a33-85ed-eb0ab9942c43"",
  585. ""path"": ""<Keyboard>/upArrow"",
  586. ""interactions"": """",
  587. ""processors"": """",
  588. ""groups"": ""Keyboard&Mouse"",
  589. ""action"": ""Navigate"",
  590. ""isComposite"": false,
  591. ""isPartOfComposite"": true
  592. },
  593. {
  594. ""name"": ""down"",
  595. ""id"": ""2bf42165-60bc-42ca-8072-8c13ab40239b"",
  596. ""path"": ""<Keyboard>/s"",
  597. ""interactions"": """",
  598. ""processors"": """",
  599. ""groups"": ""Keyboard&Mouse"",
  600. ""action"": ""Navigate"",
  601. ""isComposite"": false,
  602. ""isPartOfComposite"": true
  603. },
  604. {
  605. ""name"": ""down"",
  606. ""id"": ""85d264ad-e0a0-4565-b7ff-1a37edde51ac"",
  607. ""path"": ""<Keyboard>/downArrow"",
  608. ""interactions"": """",
  609. ""processors"": """",
  610. ""groups"": ""Keyboard&Mouse"",
  611. ""action"": ""Navigate"",
  612. ""isComposite"": false,
  613. ""isPartOfComposite"": true
  614. },
  615. {
  616. ""name"": ""left"",
  617. ""id"": ""74214943-c580-44e4-98eb-ad7eebe17902"",
  618. ""path"": ""<Keyboard>/a"",
  619. ""interactions"": """",
  620. ""processors"": """",
  621. ""groups"": ""Keyboard&Mouse"",
  622. ""action"": ""Navigate"",
  623. ""isComposite"": false,
  624. ""isPartOfComposite"": true
  625. },
  626. {
  627. ""name"": ""left"",
  628. ""id"": ""cea9b045-a000-445b-95b8-0c171af70a3b"",
  629. ""path"": ""<Keyboard>/leftArrow"",
  630. ""interactions"": """",
  631. ""processors"": """",
  632. ""groups"": ""Keyboard&Mouse"",
  633. ""action"": ""Navigate"",
  634. ""isComposite"": false,
  635. ""isPartOfComposite"": true
  636. },
  637. {
  638. ""name"": ""right"",
  639. ""id"": ""8607c725-d935-4808-84b1-8354e29bab63"",
  640. ""path"": ""<Keyboard>/d"",
  641. ""interactions"": """",
  642. ""processors"": """",
  643. ""groups"": ""Keyboard&Mouse"",
  644. ""action"": ""Navigate"",
  645. ""isComposite"": false,
  646. ""isPartOfComposite"": true
  647. },
  648. {
  649. ""name"": ""right"",
  650. ""id"": ""4cda81dc-9edd-4e03-9d7c-a71a14345d0b"",
  651. ""path"": ""<Keyboard>/rightArrow"",
  652. ""interactions"": """",
  653. ""processors"": """",
  654. ""groups"": ""Keyboard&Mouse"",
  655. ""action"": ""Navigate"",
  656. ""isComposite"": false,
  657. ""isPartOfComposite"": true
  658. },
  659. {
  660. ""name"": """",
  661. ""id"": ""9e92bb26-7e3b-4ec4-b06b-3c8f8e498ddc"",
  662. ""path"": ""*/{Submit}"",
  663. ""interactions"": """",
  664. ""processors"": """",
  665. ""groups"": ""Keyboard&Mouse;Gamepad;Touch;Joystick;XR"",
  666. ""action"": ""Submit"",
  667. ""isComposite"": false,
  668. ""isPartOfComposite"": false
  669. },
  670. {
  671. ""name"": """",
  672. ""id"": ""82627dcc-3b13-4ba9-841d-e4b746d6553e"",
  673. ""path"": ""*/{Cancel}"",
  674. ""interactions"": """",
  675. ""processors"": """",
  676. ""groups"": ""Keyboard&Mouse;Gamepad;Touch;Joystick;XR"",
  677. ""action"": ""Cancel"",
  678. ""isComposite"": false,
  679. ""isPartOfComposite"": false
  680. },
  681. {
  682. ""name"": """",
  683. ""id"": ""c52c8e0b-8179-41d3-b8a1-d149033bbe86"",
  684. ""path"": ""<Mouse>/position"",
  685. ""interactions"": """",
  686. ""processors"": """",
  687. ""groups"": ""Keyboard&Mouse"",
  688. ""action"": ""Point"",
  689. ""isComposite"": false,
  690. ""isPartOfComposite"": false
  691. },
  692. {
  693. ""name"": """",
  694. ""id"": ""e1394cbc-336e-44ce-9ea8-6007ed6193f7"",
  695. ""path"": ""<Pen>/position"",
  696. ""interactions"": """",
  697. ""processors"": """",
  698. ""groups"": ""Keyboard&Mouse"",
  699. ""action"": ""Point"",
  700. ""isComposite"": false,
  701. ""isPartOfComposite"": false
  702. },
  703. {
  704. ""name"": """",
  705. ""id"": ""5693e57a-238a-46ed-b5ae-e64e6e574302"",
  706. ""path"": ""<Touchscreen>/touch*/position"",
  707. ""interactions"": """",
  708. ""processors"": """",
  709. ""groups"": ""Touch"",
  710. ""action"": ""Point"",
  711. ""isComposite"": false,
  712. ""isPartOfComposite"": false
  713. },
  714. {
  715. ""name"": """",
  716. ""id"": ""4faf7dc9-b979-4210-aa8c-e808e1ef89f5"",
  717. ""path"": ""<Mouse>/leftButton"",
  718. ""interactions"": """",
  719. ""processors"": """",
  720. ""groups"": "";Keyboard&Mouse"",
  721. ""action"": ""Click"",
  722. ""isComposite"": false,
  723. ""isPartOfComposite"": false
  724. },
  725. {
  726. ""name"": """",
  727. ""id"": ""8d66d5ba-88d7-48e6-b1cd-198bbfef7ace"",
  728. ""path"": ""<Pen>/tip"",
  729. ""interactions"": """",
  730. ""processors"": """",
  731. ""groups"": "";Keyboard&Mouse"",
  732. ""action"": ""Click"",
  733. ""isComposite"": false,
  734. ""isPartOfComposite"": false
  735. },
  736. {
  737. ""name"": """",
  738. ""id"": ""47c2a644-3ebc-4dae-a106-589b7ca75b59"",
  739. ""path"": ""<Touchscreen>/touch*/press"",
  740. ""interactions"": """",
  741. ""processors"": """",
  742. ""groups"": ""Touch"",
  743. ""action"": ""Click"",
  744. ""isComposite"": false,
  745. ""isPartOfComposite"": false
  746. },
  747. {
  748. ""name"": """",
  749. ""id"": ""bb9e6b34-44bf-4381-ac63-5aa15d19f677"",
  750. ""path"": ""<XRController>/trigger"",
  751. ""interactions"": """",
  752. ""processors"": """",
  753. ""groups"": ""XR"",
  754. ""action"": ""Click"",
  755. ""isComposite"": false,
  756. ""isPartOfComposite"": false
  757. },
  758. {
  759. ""name"": """",
  760. ""id"": ""38c99815-14ea-4617-8627-164d27641299"",
  761. ""path"": ""<Mouse>/scroll"",
  762. ""interactions"": """",
  763. ""processors"": """",
  764. ""groups"": "";Keyboard&Mouse"",
  765. ""action"": ""ScrollWheel"",
  766. ""isComposite"": false,
  767. ""isPartOfComposite"": false
  768. },
  769. {
  770. ""name"": """",
  771. ""id"": ""24066f69-da47-44f3-a07e-0015fb02eb2e"",
  772. ""path"": ""<Mouse>/middleButton"",
  773. ""interactions"": """",
  774. ""processors"": """",
  775. ""groups"": "";Keyboard&Mouse"",
  776. ""action"": ""MiddleClick"",
  777. ""isComposite"": false,
  778. ""isPartOfComposite"": false
  779. },
  780. {
  781. ""name"": """",
  782. ""id"": ""4c191405-5738-4d4b-a523-c6a301dbf754"",
  783. ""path"": ""<Mouse>/rightButton"",
  784. ""interactions"": """",
  785. ""processors"": """",
  786. ""groups"": "";Keyboard&Mouse"",
  787. ""action"": ""RightClick"",
  788. ""isComposite"": false,
  789. ""isPartOfComposite"": false
  790. },
  791. {
  792. ""name"": """",
  793. ""id"": ""7236c0d9-6ca3-47cf-a6ee-a97f5b59ea77"",
  794. ""path"": ""<XRController>/devicePosition"",
  795. ""interactions"": """",
  796. ""processors"": """",
  797. ""groups"": ""XR"",
  798. ""action"": ""TrackedDevicePosition"",
  799. ""isComposite"": false,
  800. ""isPartOfComposite"": false
  801. },
  802. {
  803. ""name"": """",
  804. ""id"": ""23e01e3a-f935-4948-8d8b-9bcac77714fb"",
  805. ""path"": ""<XRController>/deviceRotation"",
  806. ""interactions"": """",
  807. ""processors"": """",
  808. ""groups"": ""XR"",
  809. ""action"": ""TrackedDeviceOrientation"",
  810. ""isComposite"": false,
  811. ""isPartOfComposite"": false
  812. }
  813. ]
  814. }
  815. ],
  816. ""controlSchemes"": [
  817. {
  818. ""name"": ""Keyboard&Mouse"",
  819. ""bindingGroup"": ""Keyboard&Mouse"",
  820. ""devices"": [
  821. {
  822. ""devicePath"": ""<Keyboard>"",
  823. ""isOptional"": false,
  824. ""isOR"": false
  825. },
  826. {
  827. ""devicePath"": ""<Mouse>"",
  828. ""isOptional"": false,
  829. ""isOR"": false
  830. }
  831. ]
  832. },
  833. {
  834. ""name"": ""Gamepad"",
  835. ""bindingGroup"": ""Gamepad"",
  836. ""devices"": [
  837. {
  838. ""devicePath"": ""<Gamepad>"",
  839. ""isOptional"": false,
  840. ""isOR"": false
  841. }
  842. ]
  843. },
  844. {
  845. ""name"": ""Touch"",
  846. ""bindingGroup"": ""Touch"",
  847. ""devices"": [
  848. {
  849. ""devicePath"": ""<Touchscreen>"",
  850. ""isOptional"": false,
  851. ""isOR"": false
  852. }
  853. ]
  854. },
  855. {
  856. ""name"": ""Joystick"",
  857. ""bindingGroup"": ""Joystick"",
  858. ""devices"": [
  859. {
  860. ""devicePath"": ""<Joystick>"",
  861. ""isOptional"": false,
  862. ""isOR"": false
  863. }
  864. ]
  865. },
  866. {
  867. ""name"": ""XR"",
  868. ""bindingGroup"": ""XR"",
  869. ""devices"": [
  870. {
  871. ""devicePath"": ""<XRController>"",
  872. ""isOptional"": false,
  873. ""isOR"": false
  874. }
  875. ]
  876. }
  877. ]
  878. }");
  879. // Player
  880. m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
  881. m_Player_Move = m_Player.FindAction("Move", throwIfNotFound: true);
  882. m_Player_Look = m_Player.FindAction("Look", throwIfNotFound: true);
  883. m_Player_Fire = m_Player.FindAction("Fire", throwIfNotFound: true);
  884. // UI
  885. m_UI = asset.FindActionMap("UI", throwIfNotFound: true);
  886. m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true);
  887. m_UI_Submit = m_UI.FindAction("Submit", throwIfNotFound: true);
  888. m_UI_Cancel = m_UI.FindAction("Cancel", throwIfNotFound: true);
  889. m_UI_Point = m_UI.FindAction("Point", throwIfNotFound: true);
  890. m_UI_Click = m_UI.FindAction("Click", throwIfNotFound: true);
  891. m_UI_ScrollWheel = m_UI.FindAction("ScrollWheel", throwIfNotFound: true);
  892. m_UI_MiddleClick = m_UI.FindAction("MiddleClick", throwIfNotFound: true);
  893. m_UI_RightClick = m_UI.FindAction("RightClick", throwIfNotFound: true);
  894. m_UI_TrackedDevicePosition = m_UI.FindAction("TrackedDevicePosition", throwIfNotFound: true);
  895. m_UI_TrackedDeviceOrientation = m_UI.FindAction("TrackedDeviceOrientation", throwIfNotFound: true);
  896. }
  897. public void Dispose()
  898. {
  899. UnityEngine.Object.Destroy(asset);
  900. }
  901. public InputBinding? bindingMask
  902. {
  903. get => asset.bindingMask;
  904. set => asset.bindingMask = value;
  905. }
  906. public ReadOnlyArray<InputDevice>? devices
  907. {
  908. get => asset.devices;
  909. set => asset.devices = value;
  910. }
  911. public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
  912. public bool Contains(InputAction action)
  913. {
  914. return asset.Contains(action);
  915. }
  916. public IEnumerator<InputAction> GetEnumerator()
  917. {
  918. return asset.GetEnumerator();
  919. }
  920. IEnumerator IEnumerable.GetEnumerator()
  921. {
  922. return GetEnumerator();
  923. }
  924. public void Enable()
  925. {
  926. asset.Enable();
  927. }
  928. public void Disable()
  929. {
  930. asset.Disable();
  931. }
  932. public IEnumerable<InputBinding> bindings => asset.bindings;
  933. public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
  934. {
  935. return asset.FindAction(actionNameOrId, throwIfNotFound);
  936. }
  937. public int FindBinding(InputBinding bindingMask, out InputAction action)
  938. {
  939. return asset.FindBinding(bindingMask, out action);
  940. }
  941. // Player
  942. private readonly InputActionMap m_Player;
  943. private IPlayerActions m_PlayerActionsCallbackInterface;
  944. private readonly InputAction m_Player_Move;
  945. private readonly InputAction m_Player_Look;
  946. private readonly InputAction m_Player_Fire;
  947. public struct PlayerActions
  948. {
  949. private @DefaultInputActions m_Wrapper;
  950. public PlayerActions(@DefaultInputActions wrapper) { m_Wrapper = wrapper; }
  951. public InputAction @Move => m_Wrapper.m_Player_Move;
  952. public InputAction @Look => m_Wrapper.m_Player_Look;
  953. public InputAction @Fire => m_Wrapper.m_Player_Fire;
  954. public InputActionMap Get() { return m_Wrapper.m_Player; }
  955. public void Enable() { Get().Enable(); }
  956. public void Disable() { Get().Disable(); }
  957. public bool enabled => Get().enabled;
  958. public static implicit operator InputActionMap(PlayerActions set) { return set.Get(); }
  959. public void SetCallbacks(IPlayerActions instance)
  960. {
  961. if (m_Wrapper.m_PlayerActionsCallbackInterface != null)
  962. {
  963. @Move.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnMove;
  964. @Move.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnMove;
  965. @Move.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnMove;
  966. @Look.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnLook;
  967. @Look.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnLook;
  968. @Look.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnLook;
  969. @Fire.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnFire;
  970. @Fire.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnFire;
  971. @Fire.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnFire;
  972. }
  973. m_Wrapper.m_PlayerActionsCallbackInterface = instance;
  974. if (instance != null)
  975. {
  976. @Move.started += instance.OnMove;
  977. @Move.performed += instance.OnMove;
  978. @Move.canceled += instance.OnMove;
  979. @Look.started += instance.OnLook;
  980. @Look.performed += instance.OnLook;
  981. @Look.canceled += instance.OnLook;
  982. @Fire.started += instance.OnFire;
  983. @Fire.performed += instance.OnFire;
  984. @Fire.canceled += instance.OnFire;
  985. }
  986. }
  987. }
  988. public PlayerActions @Player => new PlayerActions(this);
  989. // UI
  990. private readonly InputActionMap m_UI;
  991. private IUIActions m_UIActionsCallbackInterface;
  992. private readonly InputAction m_UI_Navigate;
  993. private readonly InputAction m_UI_Submit;
  994. private readonly InputAction m_UI_Cancel;
  995. private readonly InputAction m_UI_Point;
  996. private readonly InputAction m_UI_Click;
  997. private readonly InputAction m_UI_ScrollWheel;
  998. private readonly InputAction m_UI_MiddleClick;
  999. private readonly InputAction m_UI_RightClick;
  1000. private readonly InputAction m_UI_TrackedDevicePosition;
  1001. private readonly InputAction m_UI_TrackedDeviceOrientation;
  1002. public struct UIActions
  1003. {
  1004. private @DefaultInputActions m_Wrapper;
  1005. public UIActions(@DefaultInputActions wrapper) { m_Wrapper = wrapper; }
  1006. public InputAction @Navigate => m_Wrapper.m_UI_Navigate;
  1007. public InputAction @Submit => m_Wrapper.m_UI_Submit;
  1008. public InputAction @Cancel => m_Wrapper.m_UI_Cancel;
  1009. public InputAction @Point => m_Wrapper.m_UI_Point;
  1010. public InputAction @Click => m_Wrapper.m_UI_Click;
  1011. public InputAction @ScrollWheel => m_Wrapper.m_UI_ScrollWheel;
  1012. public InputAction @MiddleClick => m_Wrapper.m_UI_MiddleClick;
  1013. public InputAction @RightClick => m_Wrapper.m_UI_RightClick;
  1014. public InputAction @TrackedDevicePosition => m_Wrapper.m_UI_TrackedDevicePosition;
  1015. public InputAction @TrackedDeviceOrientation => m_Wrapper.m_UI_TrackedDeviceOrientation;
  1016. public InputActionMap Get() { return m_Wrapper.m_UI; }
  1017. public void Enable() { Get().Enable(); }
  1018. public void Disable() { Get().Disable(); }
  1019. public bool enabled => Get().enabled;
  1020. public static implicit operator InputActionMap(UIActions set) { return set.Get(); }
  1021. public void SetCallbacks(IUIActions instance)
  1022. {
  1023. if (m_Wrapper.m_UIActionsCallbackInterface != null)
  1024. {
  1025. @Navigate.started -= m_Wrapper.m_UIActionsCallbackInterface.OnNavigate;
  1026. @Navigate.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnNavigate;
  1027. @Navigate.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnNavigate;
  1028. @Submit.started -= m_Wrapper.m_UIActionsCallbackInterface.OnSubmit;
  1029. @Submit.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnSubmit;
  1030. @Submit.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnSubmit;
  1031. @Cancel.started -= m_Wrapper.m_UIActionsCallbackInterface.OnCancel;
  1032. @Cancel.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnCancel;
  1033. @Cancel.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnCancel;
  1034. @Point.started -= m_Wrapper.m_UIActionsCallbackInterface.OnPoint;
  1035. @Point.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnPoint;
  1036. @Point.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnPoint;
  1037. @Click.started -= m_Wrapper.m_UIActionsCallbackInterface.OnClick;
  1038. @Click.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnClick;
  1039. @Click.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnClick;
  1040. @ScrollWheel.started -= m_Wrapper.m_UIActionsCallbackInterface.OnScrollWheel;
  1041. @ScrollWheel.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnScrollWheel;
  1042. @ScrollWheel.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnScrollWheel;
  1043. @MiddleClick.started -= m_Wrapper.m_UIActionsCallbackInterface.OnMiddleClick;
  1044. @MiddleClick.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnMiddleClick;
  1045. @MiddleClick.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnMiddleClick;
  1046. @RightClick.started -= m_Wrapper.m_UIActionsCallbackInterface.OnRightClick;
  1047. @RightClick.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnRightClick;
  1048. @RightClick.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnRightClick;
  1049. @TrackedDevicePosition.started -= m_Wrapper.m_UIActionsCallbackInterface.OnTrackedDevicePosition;
  1050. @TrackedDevicePosition.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnTrackedDevicePosition;
  1051. @TrackedDevicePosition.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnTrackedDevicePosition;
  1052. @TrackedDeviceOrientation.started -= m_Wrapper.m_UIActionsCallbackInterface.OnTrackedDeviceOrientation;
  1053. @TrackedDeviceOrientation.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnTrackedDeviceOrientation;
  1054. @TrackedDeviceOrientation.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnTrackedDeviceOrientation;
  1055. }
  1056. m_Wrapper.m_UIActionsCallbackInterface = instance;
  1057. if (instance != null)
  1058. {
  1059. @Navigate.started += instance.OnNavigate;
  1060. @Navigate.performed += instance.OnNavigate;
  1061. @Navigate.canceled += instance.OnNavigate;
  1062. @Submit.started += instance.OnSubmit;
  1063. @Submit.performed += instance.OnSubmit;
  1064. @Submit.canceled += instance.OnSubmit;
  1065. @Cancel.started += instance.OnCancel;
  1066. @Cancel.performed += instance.OnCancel;
  1067. @Cancel.canceled += instance.OnCancel;
  1068. @Point.started += instance.OnPoint;
  1069. @Point.performed += instance.OnPoint;
  1070. @Point.canceled += instance.OnPoint;
  1071. @Click.started += instance.OnClick;
  1072. @Click.performed += instance.OnClick;
  1073. @Click.canceled += instance.OnClick;
  1074. @ScrollWheel.started += instance.OnScrollWheel;
  1075. @ScrollWheel.performed += instance.OnScrollWheel;
  1076. @ScrollWheel.canceled += instance.OnScrollWheel;
  1077. @MiddleClick.started += instance.OnMiddleClick;
  1078. @MiddleClick.performed += instance.OnMiddleClick;
  1079. @MiddleClick.canceled += instance.OnMiddleClick;
  1080. @RightClick.started += instance.OnRightClick;
  1081. @RightClick.performed += instance.OnRightClick;
  1082. @RightClick.canceled += instance.OnRightClick;
  1083. @TrackedDevicePosition.started += instance.OnTrackedDevicePosition;
  1084. @TrackedDevicePosition.performed += instance.OnTrackedDevicePosition;
  1085. @TrackedDevicePosition.canceled += instance.OnTrackedDevicePosition;
  1086. @TrackedDeviceOrientation.started += instance.OnTrackedDeviceOrientation;
  1087. @TrackedDeviceOrientation.performed += instance.OnTrackedDeviceOrientation;
  1088. @TrackedDeviceOrientation.canceled += instance.OnTrackedDeviceOrientation;
  1089. }
  1090. }
  1091. }
  1092. public UIActions @UI => new UIActions(this);
  1093. private int m_KeyboardMouseSchemeIndex = -1;
  1094. public InputControlScheme KeyboardMouseScheme
  1095. {
  1096. get
  1097. {
  1098. if (m_KeyboardMouseSchemeIndex == -1) m_KeyboardMouseSchemeIndex = asset.FindControlSchemeIndex("Keyboard&Mouse");
  1099. return asset.controlSchemes[m_KeyboardMouseSchemeIndex];
  1100. }
  1101. }
  1102. private int m_GamepadSchemeIndex = -1;
  1103. public InputControlScheme GamepadScheme
  1104. {
  1105. get
  1106. {
  1107. if (m_GamepadSchemeIndex == -1) m_GamepadSchemeIndex = asset.FindControlSchemeIndex("Gamepad");
  1108. return asset.controlSchemes[m_GamepadSchemeIndex];
  1109. }
  1110. }
  1111. private int m_TouchSchemeIndex = -1;
  1112. public InputControlScheme TouchScheme
  1113. {
  1114. get
  1115. {
  1116. if (m_TouchSchemeIndex == -1) m_TouchSchemeIndex = asset.FindControlSchemeIndex("Touch");
  1117. return asset.controlSchemes[m_TouchSchemeIndex];
  1118. }
  1119. }
  1120. private int m_JoystickSchemeIndex = -1;
  1121. public InputControlScheme JoystickScheme
  1122. {
  1123. get
  1124. {
  1125. if (m_JoystickSchemeIndex == -1) m_JoystickSchemeIndex = asset.FindControlSchemeIndex("Joystick");
  1126. return asset.controlSchemes[m_JoystickSchemeIndex];
  1127. }
  1128. }
  1129. private int m_XRSchemeIndex = -1;
  1130. public InputControlScheme XRScheme
  1131. {
  1132. get
  1133. {
  1134. if (m_XRSchemeIndex == -1) m_XRSchemeIndex = asset.FindControlSchemeIndex("XR");
  1135. return asset.controlSchemes[m_XRSchemeIndex];
  1136. }
  1137. }
  1138. public interface IPlayerActions
  1139. {
  1140. void OnMove(InputAction.CallbackContext context);
  1141. void OnLook(InputAction.CallbackContext context);
  1142. void OnFire(InputAction.CallbackContext context);
  1143. }
  1144. public interface IUIActions
  1145. {
  1146. void OnNavigate(InputAction.CallbackContext context);
  1147. void OnSubmit(InputAction.CallbackContext context);
  1148. void OnCancel(InputAction.CallbackContext context);
  1149. void OnPoint(InputAction.CallbackContext context);
  1150. void OnClick(InputAction.CallbackContext context);
  1151. void OnScrollWheel(InputAction.CallbackContext context);
  1152. void OnMiddleClick(InputAction.CallbackContext context);
  1153. void OnRightClick(InputAction.CallbackContext context);
  1154. void OnTrackedDevicePosition(InputAction.CallbackContext context);
  1155. void OnTrackedDeviceOrientation(InputAction.CallbackContext context);
  1156. }
  1157. }
  1158. }