> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liv.tv/llms.txt
> Use this file to discover all available pages before exploring further.

# LckNotificationController

> How to show, hide, and manage in-game notifications for recording, streaming, and login events in Unity VR apps using the LIV Camera Kit (LCK) SDK.

## 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

Use `LckNotificationController` to give users visual feedback during recording, streaming, and authentication flows.

### Showing a saved video notification

```c# theme={null}
_notificationController.ShowNotification(NotificationType.VideoSaved);
```

### Displaying a login code

```c# theme={null}
_notificationController.SetNotificationStreamCode("123-456");
```

### Clearing all notifications

```c# theme={null}
_notificationController.HideNotifications();
```

***

## 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

* [LckStreamingController](/api-reference/unity/classes/LckStreamingController) — Streaming controller that triggers notifications during auth/streaming flows
* [LckOnScreenUIController](/api-reference/unity/classes/LckOnScreenUIController) — UI controller that reacts to notification show/hide events
