logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityPlayerInputDeviceFilterSettings

    Unity ScriptableObject implementation of player input device filtering settings.
    Provides comprehensive device filtering capabilities including basic device type restrictions, layout-based filtering, and advanced name/ID matching.
    Supports both whitelist and blacklist approaches for fine-grained control over which input devices are accepted by the system.

    Inheritance
    object
    UnityPlayerInputDeviceFilterSettings
    Implements
    IPlayerInputDeviceFilterSettings
    IFoundationSettings
    Namespace: Serenity.InputGateway.Infrastructure.Settings
    Assembly: Serenity.UnityPlayerInput.Infrastructure.dll
    Syntax
    public class UnityPlayerInputDeviceFilterSettings : ScriptableObject, IPlayerInputDeviceFilterSettings, IFoundationSettings

    Constructors

    UnityPlayerInputDeviceFilterSettings()

    Declaration
    public UnityPlayerInputDeviceFilterSettings()

    Fields

    AllowGamepads

    Declaration
    public bool AllowGamepads
    Field Value
    Type Description
    bool

    AllowKeyboards

    Declaration
    public bool AllowKeyboards
    Field Value
    Type Description
    bool

    Gets or sets whether keyboard devices are allowed.

    AllowMouse

    Declaration
    public bool AllowMouse
    Field Value
    Type Description
    bool

    Gets or sets whether mouse devices are allowed.

    AllowedDeviceIds

    Declaration
    public string[] AllowedDeviceIds
    Field Value
    Type Description
    string[]

    Gets or sets specific device IDs that are allowed to be used.
    When populated, acts as a whitelist where only devices with matching IDs are accepted.

    AllowedDisplayNameContains

    Declaration
    public string[] AllowedDisplayNameContains
    Field Value
    Type Description
    string[]

    Gets or sets display name substrings for allowed devices.
    Devices whose display names contain any of these strings will be permitted.

    AllowedLayouts

    Declaration
    public string[] AllowedLayouts
    Field Value
    Type Description
    string[]

    Gets or sets the allowed Input System layout names.
    When populated, acts as a whitelist where only devices with matching layouts are accepted.

    DeniedDeviceIds

    Declaration
    public string[] DeniedDeviceIds
    Field Value
    Type Description
    string[]

    Gets or sets specific device IDs that are denied from being used.
    Devices with IDs matching these entries will be rejected.

    DeniedDisplayNameContains

    Declaration
    public string[] DeniedDisplayNameContains
    Field Value
    Type Description
    string[]

    Gets or sets display name substrings for denied devices.
    Devices whose display names contain any of these strings will be rejected.

    DeniedLayouts

    Declaration
    public string[] DeniedLayouts
    Field Value
    Type Description
    string[]

    Gets or sets the denied Input System layout names.
    Devices with layouts matching these entries will be rejected.

    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.

    Methods

    Accept(string, string, string)

    Determines if a device is accepted based on its ID, layout, and display name according to the configured rules.

    Declaration
    public bool Accept(string deviceId, string layout, string displayName)
    Parameters
    Type Name Description
    string deviceId

    The unique identifier of the device.

    string layout

    The layout string of the device.

    string displayName

    The display name of the device.

    Returns
    Type Description
    bool

    True if the device is accepted; otherwise, false.

    Implements

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