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

# Result < T >

> How to handle success and error responses from LIV Camera Kit (LCK) SDK methods in Unity without exceptions.

## Description

`Result<T>` is the standard return type for all `LckCore` operations. Instead of throwing exceptions, methods like `Initialize()`, `HasUserConfiguredStreaming()`, `IsUserSubscribed()`, and `StartLoginAttemptAsync()` return a `Result<T>` that wraps either a success value or an error with a message.

This gives you consistent, predictable error handling across the entire SDK without try/catch blocks.

***

## Usage

Use `Result<T>` whenever you call an LckCore method. Always check `IsOk` before accessing the value.

```c# theme={null}
Result<bool> initResult = LckCore.Initialize("trackingId", gameInfo);

if (initResult.IsOk)
{
    Debug.Log("Initialization successful!");
}
else
{
    Debug.LogError($"Init failed: {initResult.Err} - {initResult.Message}");
}
```

***

## References

### Properties

| Property    | Type          | Description                                                                                           |
| :---------- | :------------ | :---------------------------------------------------------------------------------------------------- |
| **IsOk**    | `bool`        | Indicates whether the operation was successful. Always check this first.                              |
| **Message** | `string`      | Error message when the operation fails. `null` if successful.                                         |
| **Err**     | `CoreError` ? | High-level error category (e.g., `InternalError`, `InvalidArgument`). `null` if successful.           |
| **Ok**      | `T`           | The result value on success. Returns default(`T`) (e.g., `null`, `0`, or `false`) if `IsOk == false`. |

***

### Methods

| Method                                                       | Returns     | Description                                                                                   |
| :----------------------------------------------------------- | :---------- | :-------------------------------------------------------------------------------------------- |
| `static Result<T> NewSuccess(T result)`                      | `Result<T>` | Creates a result representing a successful operation and wraps the returned value.            |
| `static Result<T> NewError(CoreError error, string message)` | `Result<T>` | Creates a result representing a failed operation, with an error type and descriptive message. |

***

## See Also

* [LckCore](/api-reference/unity/classes/core/LckCore) — Primary class whose methods return Result\<T>
* [CoreError](/api-reference/unity/enums/CoreError) — Error category enum used in the Err property
