Skip to content

Commit 130013b

Browse files
committed
DOCATT-8610: Updated PlayerInputManager.cs and PlayerJoinBehavior.cs
- Added doc for JoinPlayersWhenJoinActionIsTriggered value - Clarified that disabling the action can result when DisableJoining() is called on an action that was joined with the JoinPlayersWhenJoinActionIsTriggered behaviour
1 parent 3f2f394 commit 130013b

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputManager.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,12 @@ public void EnableJoining()
334334
/// <summary>
335335
/// Inhibit players from joining the game.
336336
/// </summary>
337+
/// <remarks>
338+
/// Note that this method might disable the action, depending on how the action
339+
/// was joined initially. Specifically, if the initial joining was triggered using
340+
/// the <see cref="joinBehavior.JoinPlayersWhenJoinActionIsTriggered"/> behavior,
341+
/// this method also disables the join action.
342+
/// </remarks>
337343
/// <seealso cref="EnableJoining"/>
338344
/// <seealso cref="joiningEnabled"/>
339345
public void DisableJoining()

Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerJoinBehavior.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ public enum PlayerJoinBehavior
1515
/// </summary>
1616
JoinPlayersWhenButtonIsPressed,
1717

18+
/// <summary>
19+
/// Listen for button presses on devices that are not paired to any player. If the control
20+
/// they triggered matches a specific action and joining is allowed, join a new player using
21+
/// the device the button was pressed on.
22+
/// </summary>
1823
JoinPlayersWhenJoinActionIsTriggered,
1924

2025
/// <summary>
21-
/// Do not join players automatically. Call <see cref="PlayerInputManager.JoinPlayerFromUI"/> or <see cref="PlayerInputManager.JoinPlayerFromAction"/>
22-
/// explicitly in order to join new players. Alternatively, just create GameObjects with <see cref="PlayerInput"/>
26+
/// Don't join players automatically. Call <see cref="PlayerInputManager.JoinPlayerFromUI"/>
27+
/// or <see cref="PlayerInputManager.JoinPlayerFromAction"/> explicitly in order to join new
28+
/// players. Alternatively, just create GameObjects with <see cref="PlayerInput"/>
2329
/// components directly and they will be joined automatically.
2430
/// </summary>
2531
/// <remarks>

0 commit comments

Comments
 (0)