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

# GameInfo

> Provide game and engine metadata to LckCore during SDK initialization for compatibility tracking and analytics.

## What Problem Does This Solve?

When your app initializes the LCK SDK, the system needs to know basic information about your game: name, version, what engine you're using, which render pipeline, etc. This helps with:

* Compatibility reporting (which Unity versions work with which SDK versions)
* Debugging (crash reports show engine version and graphics API)
* Analytics (understanding which games/platforms use the SDK)

`GameInfo` is a struct you populate and pass to `LckCore.Initialize()` during startup.

## When to Use This

You create and pass `GameInfo` once during app initialization:

```csharp theme={null}
void Start()
{
    var gameInfo = new GameInfo { /* ... */ };
    LckCore.Initialize("your-tracking-id", gameInfo);
}
```

This is a required parameter for SDK initialization—you'll always use it.

***

## Quick Example

```csharp theme={null}
using UnityEngine;

void InitializeLCK()
{
    var gameInfo = new GameInfo
    {
        GameName = "Space Blasters VR",
        GameVersion = "1.2.3",
        ProjectName = "SpaceBlasters",
        CompanyName = "Awesome Games Studio",
        EngineVersion = Application.unityVersion,
        RenderPipeline = "URP",
        GraphicsAPI = SystemInfo.graphicsDeviceType.ToString()
    };
    
    var result = LckCore.Initialize("tracking-id-12345", gameInfo);
    
    if (!result.IsOk)
    {
        Debug.LogError($"LCK initialization failed: {result.Message}");
        return;
    }
    
    Debug.Log("LCK initialized successfully");
}
```

***

## Field Details

### GameName

The display name of your game as users see it.

```csharp theme={null}
GameName = "Beat Saber Clone"
```

### GameVersion

Your app's version string. Use semantic versioning (major.minor.patch).

```csharp theme={null}
GameVersion = "2.1.0"
GameVersion = Application.version  // Unity's version from Player Settings
```

### ProjectName

Internal project name (can match GameName if you prefer).

```csharp theme={null}
ProjectName = "BeatSaberClone"
```

### CompanyName

Your studio or publisher name.

```csharp theme={null}
CompanyName = "Indie VR Games"
CompanyName = Application.companyName  // From Unity Player Settings
```

### EngineVersion

The Unity (or Unreal) version you're building with.

```csharp theme={null}
// Unity
EngineVersion = Application.unityVersion  // e.g., "2022.3.10f1"

// Unreal (example)
EngineVersion = "5.3.2"
```

### RenderPipeline

Which render pipeline your project uses.

```csharp theme={null}
// Unity built-in
RenderPipeline = "Built-in"

// Universal Render Pipeline
RenderPipeline = "URP"

// High Definition Render Pipeline
RenderPipeline = "HDRP"

// Unreal
RenderPipeline = "Deferred"
```

<Info>
  Detect Unity's render pipeline at runtime:

  ```csharp theme={null}
  #if UNITY_PIPELINE_URP
      RenderPipeline = "URP"
  #elif UNITY_PIPELINE_HDRP
      RenderPipeline = "HDRP"
  #else
      RenderPipeline = "Built-in"
  #endif
  ```
</Info>

### GraphicsAPI

The graphics API currently in use.

```csharp theme={null}
// Auto-detect in Unity
GraphicsAPI = SystemInfo.graphicsDeviceType.ToString()
// Outputs: "Direct3D11", "Vulkan", "Metal", "OpenGLES3", etc.
```

***

## Complete Example (Unity)

```csharp theme={null}
using UnityEngine;

public class LCKInitializer : MonoBehaviour
{
    void Awake()
    {
        InitializeLCK();
    }
    
    void InitializeLCK()
    {
        var gameInfo = new GameInfo
        {
            GameName = Application.productName,
            GameVersion = Application.version,
            ProjectName = Application.productName,
            CompanyName = Application.companyName,
            EngineVersion = Application.unityVersion,
            RenderPipeline = GetRenderPipeline(),
            GraphicsAPI = SystemInfo.graphicsDeviceType.ToString()
        };
        
        var initResult = LckCore.Initialize(
            "your-tracking-id-here", 
            gameInfo
        );
        
        if (!initResult.IsOk)
        {
            Debug.LogError($"LCK failed to initialize: {initResult.Message}");
            return;
        }
        
        Debug.Log($"LCK initialized for {gameInfo.GameName} v{gameInfo.GameVersion}");
    }
    
    string GetRenderPipeline()
    {
        #if UNITY_PIPELINE_URP
            return "URP";
        #elif UNITY_PIPELINE_HDRP
            return "HDRP";
        #else
            return "Built-in";
        #endif
    }
}
```

***

## Why This Information Matters

**For debugging:**

* Crash reports show engine version and graphics API
* Easier to reproduce issues when you know exact configuration

**For compatibility:**

* SDK team can track which engine versions work/break
* Helps prioritize which platforms to test

**For analytics:**

* Understand which games/studios use the SDK
* Track adoption across Unity vs. Unreal, different pipelines

***

## API Reference

### Fields

| Field            | Type     | Description                                  |
| ---------------- | -------- | -------------------------------------------- |
| `GameName`       | `string` | Display name of the game                     |
| `GameVersion`    | `string` | Version string (e.g., "1.0.0")               |
| `ProjectName`    | `string` | Internal project name                        |
| `CompanyName`    | `string` | Studio or publisher name                     |
| `EngineVersion`  | `string` | Engine version (Unity/Unreal)                |
| `RenderPipeline` | `string` | Active render pipeline (URP, HDRP, Built-in) |
| `GraphicsAPI`    | `string` | Graphics API (DirectX, Vulkan, Metal, etc.)  |

### Used By

* `LckCore.Initialize(string trackingId, GameInfo gameInfo)` — Required parameter for SDK initialization

***

## Common Mistakes

<Warning>
  **Don't hardcode version strings** — Use `Application.version` or auto-detect to avoid mismatches.
</Warning>

```csharp theme={null}
// Bad - will be wrong after version bump
GameVersion = "1.0.0"

// Good - always matches build
GameVersion = Application.version
```

<Warning>
  **Don't guess the render pipeline** — Use preprocessor directives or runtime detection.
</Warning>

```csharp theme={null}
// Bad - might be wrong
RenderPipeline = "URP"

// Good - guaranteed correct
#if UNITY_PIPELINE_URP
    RenderPipeline = "URP"
#else
    RenderPipeline = "Built-in"
#endif
```

***

## Best Practices

<Check>**Auto-detect everything** — Use Unity's `Application` and `SystemInfo` APIs</Check>
<Check>**Initialize early** — Call in `Awake()` or `Start()` before using other LCK features</Check>
<Check>**Log failures** — Always check `IsOk` and log `Message` if initialization fails</Check>
<Check>**Use semantic versioning** — Format: `major.minor.patch` (e.g., "2.1.0")</Check>

***
