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

# LckCore

> How to initialize the LIV Camera Kit (LCK) SDK, authenticate users, and check streaming/subscription status in Unity VR apps.

## Description

`LckCore` is the entry point for setting up the LIV Camera Kit before any recording or streaming can happen. It handles SDK initialization with your tracking ID, manages user authentication via LIV Hub, and lets you check whether users have configured streaming or hold an active subscription.

This class should always be used as provided; re-implementing it is not recommended. For custom streaming flows, use `LckStreamingController`.

***

## Usage

Use `LckCore` at game startup to initialize the SDK, and during the streaming setup flow to authenticate users and verify their configuration.

### Initialization

```c# theme={null}
var gameInfo = new GameInfo
{
    GameName = "My Game",
    GameVersion = "1.0.0",
    ProjectName = "MyProject",
    CompanyName = "MyCompany",
    EngineVersion = Application.unityVersion,
    RenderPipeline = "URP",
    GraphicsAPI = SystemInfo.graphicsDeviceType.ToString()
};

var initResult = LckCore.Initialize("tracking-id-123", gameInfo);
if (!initResult.IsOk)
{
    Debug.LogError($"Initialization failed: {initResult.Message}");
}
```

### Authentication Flow

```c# theme={null}
// Start login attempt
var loginResult = await LckCore.StartLoginAttemptAsync();
if (loginResult.IsOk)
{
    Debug.Log($"Login code: {loginResult.Ok}");
}

// Poll to check whether login is complete
var loginCheck = await LckCore.CheckLoginCompletedAsync();
if (loginCheck.IsOk && loginCheck.Ok)
{
    Debug.Log("User successfully logged in!");
}
```

### Checking User Status

```c# theme={null}
// Has the user configured streaming?
var hasStreaming = await LckCore.HasUserConfiguredStreaming();
Debug.Log($"Streaming configured: {hasStreaming.Ok}");

// Is the user subscribed?
var subscription = await LckCore.IsUserSubscribed();
Debug.Log($"User subscribed: {subscription.Ok}");
```

### Cleanup

```c# theme={null}
LckCore.Dispose();
```

***

## References

### Methods

| Method                                                           | Returns                | Description                                                 |
| :--------------------------------------------------------------- | :--------------------- | :---------------------------------------------------------- |
| SetMaxLogLevel([`LevelFilter`](/api-reference/enum/LevelFilter)) | void                   | Sets the maximum log verbosity.                             |
| Initialize(string, [`GameInfo`](/api-reference/struct/GameInfo)) | Result\<bool>          | Initializes the SDK with tracking ID and game info.         |
| HasUserConfiguredStreaming()                                     | Task\<Result\<bool>>   | Checks if the user has configured streaming.                |
| IsUserSubscribed()                                               | Task\<Result\<bool>>   | Checks if the user has an active subscription.              |
| StartLoginAttemptAsync()                                         | Task\<Result\<string>> | Starts a login attempt, returns a login code if successful. |
| CheckLoginCompletedAsync()                                       | Task\<Result\<bool>>   | Polls whether the login attempt has completed.              |
| Dispose()                                                        | void                   | Releases resources and cleans up the SDK.                   |

***

## See Also

* [Result T](/api-reference/unity/classes/core/Result) — Generic result type returned by all LckCore methods
* [GameInfo](/api-reference/unity/structs/core/GameInfo) — Struct passed to Initialize with game metadata
* [LevelFilter](/api-reference/unity/enums/core/LevelFilter) — Log verbosity levels for SetMaxLogLevel
* [LckStreamingController](/api-reference/unity/classes/LckStreamingController) — Higher-level streaming workflow built on LckCore
