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.
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
Methods
CanPlay(IFeedbackEffect)
Declaration
public bool CanPlay(IFeedbackEffect effect)
Parameters
Returns
Play(FeedbackTarget, IFeedbackEffect)
Declaration
public void Play(FeedbackTarget target, IFeedbackEffect effect)
Parameters
Stop(FeedbackTarget)
Declaration
public void Stop(FeedbackTarget target)
Parameters
StopAll()
Declaration
Implements