Skip to main content

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

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

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

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

LckCore.Dispose();

References

Methods

MethodReturnsDescription
SetMaxLogLevel(LevelFilter)voidSets the maximum log verbosity.
Initialize(string, 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()voidReleases resources and cleans up the SDK.

See Also

  • Result<T> — Generic result type returned by all LckCore methods
  • GameInfo — Struct passed to Initialize with game metadata
  • LevelFilter — Log verbosity levels for SetMaxLogLevel
  • LckStreamingController — Higher-level streaming workflow built on LckCore