# GDK Installation Guide

## Requirements

* Unity 2022.3.39+
* Minimum Android SDK version: 24
* Minimum iOS version: 12.0

## Import GDK package

* Download the latest GDK Unity package \[here]
* Import `.unitypackage` into your project

## Setup

Drag and drop the GDK prefab from `Assets/NEGdk/Prefab/NEGdk.prefab` into your start scene

Select the NEGdk GameObject and update the configuration in the Inspector for your game.

NEGDK uses Ramper to support social login on Android and iOS. Your app's `scheme` must be configured for this feature to work. Follow the section below for setting up your app's `scheme` on Android and iOS.

### Setup for Android

* Create custom `AndroidManifest` by checking the box `Custom Main Manifest` in `Player Setting/Android/Publising Settings`. `AndroidManifest`&#x20;
* The file will be found at `Assets/Plugins/Android/AndroidManifest.xml`
* Add your app's scheme in `activity` section in `AndroidManifest.xml`:

{% code fullWidth="true" %}

```xml
<application>
        <activity android:name="com.unity3d.player.UnityPlayerActivity"
                  android:theme="@style/UnityThemeSelector">

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="your_app_scheme"/>
            </intent-filter>
    
        </activity>
    </application>
```

{% endcode %}

* Add INTERNET permission in `AndroidManifest.xml`:

{% code fullWidth="true" %}

```xml
<uses-permission android:name="android.permission.INTERNET" />
```

{% endcode %}

### Setup for iOS

* Update `Assets/NEGdk/Editor/IOSPostProcessBuild.cs` to add your app scheme for iOS automatically whenever building an XCode project with Unity:

{% code fullWidth="true" %}

```csharp
public static class IOSPostProcessBuild
{
    // UPDATE YOUR APP SCHEME HERE
    private static readonly string BundleURLScheme = "your_app_scheme"; 
```

{% endcode %}

## Example

You can check out the example code at `Asssets/NEGdk/Sample/NEGdkSample.cs`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.eternals.game/gdk-documentation/unity/gdk-installation-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
