logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    UnityPlayerInputJoinGateSettings
    Implements
    IPlayerInputJoinGateSettings
    IFoundationSettings
    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.
    When enabled, only one player can use keyboard input at a time.

    atMostOneMouse

    Declaration
    public bool atMostOneMouse
    Field Value
    Type Description
    bool

    Gets or sets whether to limit mouse usage to at most one player.
    When enabled, only one player can use mouse input at a time.

    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.
    When enabled, each input device can only be used by one player at a time.

    maxPlayers

    Declaration
    public int maxPlayers
    Field Value
    Type Description
    int

    Gets or sets the maximum number of players allowed to join.
    Set to 0 to use the PlayerInputManager's maxPlayerCount instead of imposing additional limits.

    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.

    Implements

    IPlayerInputJoinGateSettings
    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved