Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

RequestResetCommand.cs 1.0KB

123456789101112131415161718192021222324252627282930313233
  1. using System.Runtime.InteropServices;
  2. using UnityEngine.InputSystem.Utilities;
  3. namespace UnityEngine.InputSystem.LowLevel
  4. {
  5. /// <summary>
  6. /// A command to tell the runtime to reset the device to it's default state.
  7. /// </summary>
  8. /// <remarks>
  9. /// This triggers an event being sent from the device that represents an empty, or untouched device.
  10. /// </remarks>
  11. /// <seealso cref="RequestSyncCommand"/>
  12. [StructLayout(LayoutKind.Explicit, Size = InputDeviceCommand.kBaseCommandSize)]
  13. public struct RequestResetCommand : IInputDeviceCommandInfo
  14. {
  15. public static FourCC Type => new FourCC('R', 'S', 'E', 'T');
  16. internal const int kSize = InputDeviceCommand.kBaseCommandSize;
  17. [FieldOffset(0)]
  18. public InputDeviceCommand baseCommand;
  19. public FourCC typeStatic => Type;
  20. public static RequestResetCommand Create()
  21. {
  22. return new RequestResetCommand
  23. {
  24. baseCommand = new InputDeviceCommand(Type, kSize)
  25. };
  26. }
  27. }
  28. }