# Install SDK

MyChips Offerwall Integration Documentation

This documentation guides you through integrating the MyChips Offerwall into your Unity project. The MyChips Offerwall is a powerful tool for monetizing your game by rewarding users with in-game items or currency in exchange for engaging with advertisements. By following these steps, you'll seamlessly add the Offerwall to your game, enhancing user engagement and potentially increasing your revenue.

### Prerequisites

* Ensure a Unity project is already set up.
* Familiarize yourself with basic Unity operations.
* Have an active MyChips account to access your ad unit ID, essential for integration.
* Unity Version Requirement: Minimum version 2020.3.

### Step 1: Download the Package

First, download the MyChips Offerwall Unity&#x20;

{% file src="<https://1889388802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8FPXPNk0nLIRsJsg3nxP%2Fuploads%2F7psK8XXWI1bkJ51r7IeG%2Fmychips-offerwall.1.2.6.unitypackage?alt=media&token=3511d760-3f4d-41d0-a794-ef6007134dee>" %}

### Step 2: Import the Package

**After downloading the package, you can import it into your Unity project using one of the following methods:**

1. **Using Unity's Import Package Menu:**
   * Open Unity and load your project.
   * Go to **Assets > Import Package > Custom Package**.
   * Select the downloaded **MyChips Offerwall** package and click **Open**.
   * Ensure all files are selected in the import window, then click **Import**.
2. **Using Drag and Drop:**
   * Simply drag and drop the downloaded package directly into the Unity **Assets** area.

### Step 3: Initial Setup

#### Go to the Very First Scene

Ensure you're in the first scene of your game where you intend to integrate the Offerwall. This is usually the main menu or the initial loading scene.

#### Access MyChips Settings

* Navigate to `Window` > `MyChips Settings` in the Unity editor menu.
* Click `Add Prefab` to add the MyChips Offerwall prefab to your scene.

<figure><img src="https://t20519595.p.clickup-attachments.com/t20519595/8e74947d-dda9-4a85-899e-b9306fe7752b/image.png" alt=""><figcaption></figcaption></figure>

#### Configure the Prefab

Select the created MyChips game object in your scene. In the Inspector window, you'll need to add your Ad Unit ID.

**Ad Unit ID**

To find your Ad Unit ID:

* Log into your MyChips publisher dashboard.
* Navigate to the section where your ad units are listed.
* Copy the Ad Unit ID designated for the Android/iOS platform.

Paste this ID into the corresponding field in the MyChips game object's Inspector window.

<figure><img src="https://t20519595.p.clickup-attachments.com/t20519595/535b626d-ea3f-4703-b204-096ea7c42e4f/image.png" alt=""><figcaption></figcaption></figure>

#### Step 4: Show the Offerwall

To display the Offerwall within your game, use the following code snippet at the point where you want the Offerwall to appear:

```csharp
MCOfferwallObject.Instance.ShowOfferwall();
```

#### Step 5: **(Mandatory)** – Set **Google Advertising ID (Android)** and **Identifier for Advertisers (iOS)**

Improve reward tracking and eCPM performance by passing the Google Advertising ID ([Official documentation](https://developer.android.com/training/articles/ad-id)) for Android devices and the IDFA for iOS devices.

**Android:**

```csharp
MCOfferwallObject.Instance.SetGAID("HERE YOUR GAID");
```

replace "HERE YOUR GAID" with your actual Google Advertising ID variable or value.

**iOS:**

```csharp
MCOfferwallObject.Instance.SetIDFA("HERE YOUR IDFA");
```

Replace "HERE YOUR IDFA" with your actual IDFA variable or value.

#### Step 6: (Optional) Set User ID

If your game implements its own user ID logic, you can set a custom user ID for the Offerwall:

```csharp
MCOfferwallObject.Instance.SetUserId("your_custom_user_id");
```

Replace `"your_custom_user_id"` with your actual user ID variable or value.

If you do not provide a specific user ID, one will be automatically generated.

#### Step 7: (Optional) Set User Age

You can set the user’s age to help improve ad targeting and analytics.

```csharp
MCOfferwallObject.Instance.SetAge(30);
```

Replace 30 with your actual user age variable or value (integer).

> 💡 **Note:**
>
> * The value should be an integer (e.g., 18, 25, 30).
> * Expected range is 0–100 (inclusive).

#### Step 8:  (Optional) Set User Gender

You can set the user’s gender to help improve ad targeting and analytics.

```csharp
MCOfferwallObject.Instance.SetGender(MCGenderEnum.Male);
```

Available enum values:

```csharp
MCGenderEnum.Male
MCGenderEnum.Female
MCGenderEnum.Other
```

#### Step 9: (Optional) Set Custom Parameters (`aff_sub1`–`aff_sub5` )

We provide 5 `aff_sub` parameters (`aff_sub1`, `aff_sub2`, `aff_sub3`, `aff_sub4`, `aff_sub5`), which you can use to pass custom values.

```csharp
MCOfferwallObject.Instance.SetAffSub1("your_custom_value");
MCOfferwallObject.Instance.SetAffSub2("your_custom_value");
MCOfferwallObject.Instance.SetAffSub3("your_custom_value");
MCOfferwallObject.Instance.SetAffSub4("your_custom_value");
MCOfferwallObject.Instance.SetAffSub5("your_custom_value");
```

Replace `"your_custom_value"` with your actual custom value.


---

# 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.mychips.io/unity/install-sdk.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.
