Class UnityPlayerInputJoinGateSettings
Unity ScriptableObject implementation of player input join gate settings.
Controls multiplayer session join restrictions including capacity limits, duplicate device rules, and keyboard/mouse constraints.
Provides focused join rules for managing player entry without owning device allow/deny policies.
Namespace: Serenity.InputGateway.Infrastructure.Settings
Assembly: Serenity.UnityPlayerInput.Infrastructure.dll
Syntax
public class UnityPlayerInputJoinGateSettings : ScriptableObject, IPlayerInputJoinGateSettings, IFoundationSettings
Constructors
UnityPlayerInputJoinGateSettings()
Declaration
public UnityPlayerInputJoinGateSettings()
Fields
Guid
Declaration
public string Guid
Field Value
| Type | Description |
|---|---|
| string | Global unique identifier for this settings instance. |
Id
Declaration
public string Id
Field Value
| Type | Description |
|---|---|
| string | Unique identifier for this settings instance. |
atMostOneKeyboard
Declaration
public bool atMostOneKeyboard
Field Value
| Type | Description |
|---|---|
| bool | Gets or sets whether to limit keyboard usage to at most one player. |
atMostOneMouse
Declaration
public bool atMostOneMouse
Field Value
| Type | Description |
|---|---|
| bool | Gets or sets whether to limit mouse usage to at most one player. |
denyDuplicateDevice
Declaration
public bool denyDuplicateDevice
Field Value
| Type | Description |
|---|---|
| bool | Gets or sets whether to prevent multiple players from using the same physical input device. |
maxPlayers
Declaration
public int maxPlayers
Field Value
| Type | Description |
|---|---|
| int | Gets or sets the maximum number of players allowed to join. |
Methods
Allow(string, string, IReadOnlyList<PlayerInputSlot>)
Determines if a player with the given deviceId and layout can join based on the configured join rules and current slots.
Declaration
public bool Allow(string deviceId, string layout, IReadOnlyList<PlayerInputSlot> currentSlots)
Parameters
| Type | Name | Description |
|---|---|---|
| string | deviceId | The unique identifier of the device attempting to join. |
| string | layout | The layout of the device attempting to join. |
| IReadOnlyList<PlayerInputSlot> | currentSlots | The list of currently occupied player slots. |
Returns
| Type | Description |
|---|---|
| bool | True if the player is allowed to join; otherwise, false. |