Skip to content

LedSyncManager

ClassLEDStudioLEDStudio
public static class LedSyncManager

Manages sync groups across multiple LEDStudio.LedBoardController instances. Boards that belong to the same group share a single monotonic clock and advance together, so playlists, animated sources, and flicker defects remain phase-locked across boards. Boards register/unregister on enable/disable; LEDStudio.LedSyncDriver advances the shared clock once per frame in both play and edit mode.

public static void Register(LedBoardController board, string groupId)

Adds a board to a shared clock group, creating the group from that board’s timing settings when necessary.

Parameters

Name Type
board LEDStudio.LedBoardController
groupId System.String

Remarks

Null boards and empty group IDs are ignored. Registering the same board twice has no effect.

public static void Unregister(LedBoardController board, string groupId)

Removes a board from a shared clock group and deletes the group after its final member leaves.

Parameters

Name Type
board LEDStudio.LedBoardController
groupId System.String
public static double GetGroupTime(string groupId)

Returns the shared clock time for a group, or -1 when the group does not exist. Callers treat -1 as “fall back to local clock”.

Parameters

Name Type
groupId System.String

Returns

System.Double

public static void SetGroupTime(string groupId, double time)

Sets an existing group’s shared clock in seconds so all member boards resume from the same instant.

Parameters

Name Type
groupId System.String
time System.Double

Remarks

Unknown or empty group IDs are ignored.

public static void AdvanceGroup(string groupId, float deltaTime)

Advances an existing group’s shared clock by a caller-supplied number of seconds.

Parameters

Name Type
groupId System.String
deltaTime System.Single

Remarks

Unknown or empty group IDs are ignored.

public static void AdvanceAll(float deltaTime)

Advance every registered group’s clock by the given delta.

Parameters

Name Type
deltaTime System.Single
public static void Clear()

Remove all registered groups. Use when reloading a scene from code.

public static IReadOnlyCollection<string> GroupIds { get; }

Currently known group ids (read-only snapshot).

Returns

System.Collections.Generic.IReadOnlyCollection{System.String}