InputUserPairingOptions.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. namespace UnityEngine.InputSystem.Users
  3. {
  4. /// <summary>
  5. /// Options to modify the behavior on <see cref="InputUser.PerformPairingWithDevice"/>.
  6. /// </summary>
  7. [Flags]
  8. public enum InputUserPairingOptions
  9. {
  10. /// <summary>
  11. /// Default behavior.
  12. /// </summary>
  13. None = 0,
  14. /// <summary>
  15. /// Even if the device is already paired to a user account at the platform level, force the user to select
  16. /// an account.
  17. /// </summary>
  18. /// <remarks>
  19. /// This is only supported on Xbox and Switch, at the moment.
  20. ///
  21. /// On PS4, this is ignored as account pairing is under system control. If the user wants to switch accounts,
  22. /// he/she does so by pressing the PS4 button on the controller.
  23. ///
  24. /// On Xbox, this option will bring up the account picker even if the device is already paired to a user.
  25. /// This behavior is useful to allow the player to change accounts.
  26. ///
  27. /// On platforms other than Xbox and Switch, this option is ignored.
  28. /// </remarks>
  29. ForcePlatformUserAccountSelection = 1 << 0,
  30. /// <summary>
  31. /// Suppress user account selection when supported at the platform level and a device is not currently paired
  32. /// to a user account.
  33. /// </summary>
  34. /// <remarks>
  35. /// On Xbox, if a device that does not currently have a user account logged in on it is paired to an
  36. /// <see cref="InputUser"/>, no account picker will come up and the device will be used without an associated
  37. /// user account.
  38. ///
  39. /// On Switch, this prevents the user management applet from coming up.
  40. /// </remarks>
  41. ForceNoPlatformUserAccountSelection = 1 << 1,
  42. /// <summary>
  43. /// If the user already has paired devices, unpair them first.
  44. /// </summary>
  45. UnpairCurrentDevicesFromUser = 1 << 3,
  46. }
  47. }