logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class 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.

    Inheritance
    object
    LedChannel
    Implements
    IFeedbackChannel
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Feedback.Infrastructure.Channels
    Assembly: Serenity.UnityFeedback.Infrastructure.dll
    Syntax
    public class LedChannel : IFeedbackChannel

    Constructors

    LedChannel(UnityGamepadTargetResolver, IFeedbackRuntime, IReadOnlyList<IGamepadOutputBackend>)

    Initializes a new LedChannel.

    Declaration
    public LedChannel(UnityGamepadTargetResolver resolver, IFeedbackRuntime runtime, IReadOnlyList<IGamepadOutputBackend> backends)
    Parameters
    Type Name Description
    UnityGamepadTargetResolver resolver

    Resolves a FeedbackTarget to a concrete Gamepad.

    IFeedbackRuntime runtime

    Coroutine host used to schedule the per-device auto-reset.

    IReadOnlyList<IGamepadOutputBackend> backends

    Ordered output backends tried before the DualShock light-bar fallback. The first backend that claims the pad handles it (a Switch Pro maps brightness to its monochrome Home ring internally); if none do, a DualShock light bar uses the built-in API.

    Properties

    ChannelId

    Declaration
    public string ChannelId { get; }
    Property Value
    Type Description
    string

    Methods

    CanPlay(IFeedbackEffect)

    Declaration
    public bool CanPlay(IFeedbackEffect effect)
    Parameters
    Type Name Description
    IFeedbackEffect effect
    Returns
    Type Description
    bool

    Play(FeedbackTarget, IFeedbackEffect)

    Declaration
    public void Play(FeedbackTarget target, IFeedbackEffect effect)
    Parameters
    Type Name Description
    FeedbackTarget target
    IFeedbackEffect effect

    Stop(FeedbackTarget)

    Declaration
    public void Stop(FeedbackTarget target)
    Parameters
    Type Name Description
    FeedbackTarget target

    StopAll()

    Declaration
    public void StopAll()

    Implements

    IFeedbackChannel
    In this article
    © 2026 Serenity. All Rights Reserved