Description
LckNotificationController is a Unity MonoBehaviour that handles user-facing notifications in LCK — things like “video saved”, “enter stream code”, or “configure streaming”. It instantiates notification prefabs mapped to NotificationType values, shows/hides them in response to service events, and provides a simple API for other controllers (like LckStreamingController) to trigger notifications from code.
Attach this component to a GameObject and configure notification prefabs in the Inspector. Each prefab must contain a component inheriting from LckBaseNotification.
Usage
UseLckNotificationController to give users visual feedback during recording, streaming, and authentication flows.
Showing a saved video notification
Displaying a login code
Clearing all notifications
References
NotificationType
| Value | Description |
|---|---|
| VideoSaved | Shown when a recording has been saved successfully. |
| PhotoSaved | Shown when a photo capture is saved successfully. |
| EnterStreamCode | Shown to display the LIV Hub login/stream code. |
| CheckSubscribed | Shown to prompt the user to verify or upgrade their subscription. |
| ConfigureStream | Shown to prompt the user to configure their streaming setup in LIV Hub. |
| InternalError | Shown when an error occurs during the streaming setup process. |
Properties
| Property | Type | Description |
|---|---|---|
| _notificationsInitializer | List<InitializerNotification> | Inspector-configured list mapping NotificationType to prefabs. |
| _notifications | Dictionary<NotificationType, LckBaseNotification> | Runtime dictionary of instantiated notifications. |
| _currentNotification | LckBaseNotification | Reference to the currently active notification (if any). |
| _notificationShowDuration | float | Default duration in seconds before auto-hiding a notification. |
| _notificationsTransform | Transform | Parent transform where notification prefabs are instantiated. |
| _onScreenUIController | LckOnScreenUIController | Optional higher-level UI controller that reacts to notification lifecycle events. |
Methods
| Method | Returns | Description |
|---|---|---|
| ShowNotification(NotificationType type) | void | Displays a notification of the given type. Hides any currently visible notification first. |
| HideNotifications() | void | Immediately hides any active notification and stops pending auto-hide timers. |
| SetNotificationStreamCode(string code) | void | Updates the EnterStreamCode notification with a login code. |
| InitializeNotifications() | void | Instantiates all configured notification prefabs at startup. Called in Awake(). |
| DestroyNotifications() | void | Destroys all instantiated notification prefabs for cleanup. |
See Also
- NotificationType — Enum defining all notification categories
- LckStreamingController — Streaming controller that triggers notifications during auth/streaming flows
- LckOnScreenUIController — UI controller that reacts to notification show/hide events