暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

QueryEnabledStateCommand.cs 957B

1234567891011121314151617181920212223242526272829303132
  1. using System.Runtime.InteropServices;
  2. using UnityEngine.InputSystem.Utilities;
  3. namespace UnityEngine.InputSystem.LowLevel
  4. {
  5. /// <summary>
  6. /// Command to find out whether a device is currently enabled or not.
  7. /// </summary>
  8. [StructLayout(LayoutKind.Explicit, Size = kSize)]
  9. public struct QueryEnabledStateCommand : IInputDeviceCommandInfo
  10. {
  11. public static FourCC Type => new FourCC('Q', 'E', 'N', 'B');
  12. internal const int kSize = InputDeviceCommand.kBaseCommandSize + sizeof(bool);
  13. [FieldOffset(0)]
  14. public InputDeviceCommand baseCommand;
  15. [FieldOffset(InputDeviceCommand.kBaseCommandSize)]
  16. public bool isEnabled;
  17. public FourCC typeStatic => Type;
  18. public static QueryEnabledStateCommand Create()
  19. {
  20. return new QueryEnabledStateCommand
  21. {
  22. baseCommand = new InputDeviceCommand(Type, kSize)
  23. };
  24. }
  25. }
  26. }