logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.Feedback.Infrastructure.Channels

    Classes

    AdaptiveTriggerChannel

    Feedback channel that routes DualSense adaptive-trigger effects to a pluggable backend. Handles AdaptiveTriggerEffect. The default backend is NullAdaptiveTriggerBackend (no-op) until a real PS5-SDK or PC-HID backend is registered. This channel contains NO direct HID/SDK code; all actuation is in the backend.

    AudioChannel

    Feedback channel that plays a sound from an AudioEffect by routing it to the audio player system. Target-agnostic (audio is global, not per-pad). The service dispatches audio effects un-gated, so this plays even when controller vibration is disabled. Fire-and-forget: short SFX, so Stop(FeedbackTarget)/StopAll() are intentional no-ops — they must NOT stop the whole audio bus when the feedback system halts on pause/focus-loss/vibration-disable.

    HitStopChannel

    Feedback channel that implements hit-stop: briefly dips UnityEngine.Time.timeScale then restores the prior value. Handles HitStopEffect. Target-agnostic (time scale is global). Guards against fighting the pause system: if the game is paused when Play is called, the effect is skipped. On restore, only resets timeScale if nobody else changed it in the interim.

    LedChannel

    Feedback channel that drives a controller's LED: the PlayStation light bar (DualSense / DualShock 4) and the Switch Pro's Home-button ring (monochrome — the color's brightness drives the ring intensity, hue is dropped). Handles LedEffect. Hardware routing goes through the registered IGamepadOutputBackend list; the first backend that claims the pad wins, otherwise a DualShock light bar is driven through Unity's built-in API. Devices with no controllable LED are no-ops. LED output is a desktop/editor-only feature — on other platforms actuation is skipped.

    ScreenFlashChannel

    Feedback channel that produces a full-screen color flash via a lazily-created overlay. Handles ScreenFlashEffect. Target-agnostic (one overlay drives all players). Runs on unscaled time so the flash is visible even during a hit-stop.

    ScreenShakeChannel

    Feedback channel that produces camera positional shake via a decaying jitter coroutine. Handles ScreenShakeEffect. Resolves the camera lazily via UnityEngine.Camera.main; call RegisterCamera(Transform) to override with a custom rig. The offset is applied through a UnityCameraShakeApplier (added to the camera automatically) so it survives a camera controller that sets the camera's position every frame. Uses unscaled time so it survives a hit-stop. UI shake lives in its own channel (UiScreenShakeChannel).

    UiScreenShakeChannel

    Feedback channel that shakes the UI (menus, HUD) via a decaying jitter coroutine. Handles UiScreenShakeEffect. The screen-space counterpart to ScreenShakeChannel, which shakes the camera. Drives every active UnityUiShakeReceiver through the UiShakeRegistry, and auto-attaches a receiver to each live root Canvas (throttled) so the shake follows the UI across scene/mode changes with no manual setup. Uses unscaled time so it survives a hit-stop.

    VibrationChannel

    Feedback channel that drives gamepad vibration motors. Handles VibrationEffect. Owns its own duration auto-stop: motors are set on Play and cleared after the effect duration via the shared IFeedbackRuntime (realtime, so a paused game still stops the buzz). Hardware routing goes through the registered IGamepadOutputBackend list (DualShock 4 / DualSense / Switch Pro and any future controller); the first backend that claims the pad wins, otherwise the standard Unity motor API is used. The service's global StopAll funnels into StopAll().

    In this article
    © 2026 Serenity. All Rights Reserved