logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.Feedback.Infrastructure.Hid

    Classes

    FeedbackHidDiagnostics

    Developer-facing diagnostic for the raw-HID feedback transport: signals that a controller's haptics/LED could not be driven because the host is missing the udev permissions (a Linux concern Serenity, as a Unity package, cannot and must not install itself).

    This is NOT meant to drive player-facing UI. Players must never be prompted to touch udev — installing the rules is a distribution-time concern solved invisibly (e.g. a .deb/.rpm post-install step, or the host's existing steam-devices rules). See the integration guide's "distribution recipes". The matching editor-log warning is compiled out of release builds for the same reason.

    Use this hook only for development/editor tooling, automated tests, or optional anonymous support telemetry:

    FeedbackHidDiagnostics.HidAccessDenied += info => Debug.Log($"set up udev for {info.DeviceName}");

    It fires at most once per controller per failure streak, and MAY be raised from a background thread (the Switch Pro streaming thread), so marshal to the main thread before touching Unity APIs.

    Structs

    HidAccessDeniedInfo

    Details of a controller whose raw HID node could not be opened, so its LED / vibration / adaptive triggers cannot be driven. On Linux this almost always means the /dev/hidrawN node is still root-only because the udev rules are not installed on the player's machine (see UdevRulesRelativePath); it can also mean the pad was unplugged.

    In this article
    © 2026 Serenity. All Rights Reserved