PlayerJoinBehavior.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. namespace UnityEngine.InputSystem
  2. {
  3. /// <summary>
  4. /// Determines how <see cref="PlayerInputManager"/> joins new players.
  5. /// </summary>
  6. /// <remarks>
  7. /// </remarks>
  8. /// <seealso cref="PlayerInputManager"/>
  9. /// <seealso cref="PlayerInputManager.joinBehavior"/>
  10. public enum PlayerJoinBehavior
  11. {
  12. /// <summary>
  13. /// Listen for button presses on devices that are not paired to any player. If they occur
  14. /// and joining is allowed, join a new player using the device the button was pressed on.
  15. /// </summary>
  16. JoinPlayersWhenButtonIsPressed,
  17. JoinPlayersWhenJoinActionIsTriggered,
  18. /// <summary>
  19. /// Do not join players automatically. Call <see cref="JoinPlayerFromUI"/> or <see cref="JoinPlayerFromAction"/>
  20. /// explicitly in order to join new players. Alternatively, just create GameObjects with <see cref="PlayerInput"/>
  21. /// components directly and they will be joined automatically.
  22. /// </summary>
  23. /// <remarks>
  24. /// This behavior also allows implementing more sophisticated device pairing mechanisms when multiple devices
  25. /// are involved. While initial engagement required by <see cref="JoinPlayersWhenButtonIsPressed"/> or
  26. /// <see cref="JoinPlayersWhenJoinActionIsTriggered"/> allows pairing a single device reliably to a player,
  27. /// additional devices that may be required by a control scheme will still get paired automatically out of the
  28. /// pool of available devices. This means that, for example, if a given player joins by clicking a mouse button
  29. /// ...
  30. /// </remarks>
  31. JoinPlayersManually,
  32. }
  33. }