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.
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. |
AllowedDisplayNameContains
Declaration
public string[] AllowedDisplayNameContains
Field Value
| Type | Description |
|---|---|
| string[] | Gets or sets display name substrings for allowed devices. |
AllowedLayouts
Declaration
public string[] AllowedLayouts
Field Value
| Type | Description |
|---|---|
| string[] | Gets or sets the allowed Input System layout names. |
DeniedDeviceIds
Declaration
public string[] DeniedDeviceIds
Field Value
| Type | Description |
|---|---|
| string[] | Gets or sets specific device IDs that are denied from being used. |
DeniedDisplayNameContains
Declaration
public string[] DeniedDisplayNameContains
Field Value
| Type | Description |
|---|---|
| string[] | Gets or sets display name substrings for denied devices. |
DeniedLayouts
Declaration
public string[] DeniedLayouts
Field Value
| Type | Description |
|---|---|
| string[] | Gets or sets the denied Input System layout names. |
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. |