Unity SDKs

Unity SDKs are used for integrating Xsolla products in your Unity projects.

System Requirements

  • 64-bit OS
  • Windows 7 SP1 and higher
  • macOS 10.12 and higher
  • DirectX 10
  • Visual Studio 2015
  • Unity 2018 and higher

Target OS

  • iOS
  • Android
  • Linux
  • macOS
  • Windows 32-bit
  • Windows 64-bit

Prerequisites

  1. Download Unity.
  2. Pick a personal or professional Unity license based on your preferences.
  3. Create a new Unity project.
  4. Download the asset from the Unity Assets Store or GitHub.

  1. Register an Xsolla Publisher Account.

  1. Create and set up a Publisher Account project:
    1. Go to Projects and click Create project.
    2. In setup mode, add Project name and click Create.
    3. Go to Project settings > Integration settings and check that Tokenless integration is disabled.

Login Unity SDK

Login Unity SDK is used to integrate Xsolla Login API methods with apps based on Unity. Main features:

  • Sign-in via login and password
  • Signup
  • Email confirmation
  • Password reset

The solution works for:

  • storing user data at Xsolla’s side
  • authentication via email/username and password

To integrate Login Unity SDK:

  1. Set up Login in your Publisher Account. You will need a Login ID, shown in Login settings > Login ID in the UUID format.
  2. Set up the asset for your Unity project.

Setting up Login in Publisher Account

  1. Connect Login to your project.

  1. Open Login settings.
  2. Go to Login projects and create a New Login.

  1. Specify a Login name and click Create.

  1. Go to General settings > URL block and specify the Callback URL, to which the user is redirected after the email confirmation or password reset.
  2. Select the Xsolla storage in the User data storage block.
  3. Copy Login ID.

Setting up the Asset for Your Unity Project

  1. Open your Unity project and go to Windows > Xsolla > Edit Settings > Inspector and fill in the Login ID.

  1. Go to Assets > Xsolla > Demo > Login Demo > Scenes and launch the Login scene.
  2. Create a new user and check for the confirmation email.

  1. Log in as a new user and change the password if necessary.

You can customize the integration demo settings if needed:

Store Unity SDK

Xsolla Store Unity SDK is used to integrate Xsolla Store API methods with apps based on Unity.

The solution works for:

  • selling virtual items
  • managing your in-game store

Before using the asset, you need to set up Store and Login in your Publisher Account. For integration you will need a Project ID, shown in Project settings > Project ID and Login ID, shown in Login settings > Login ID in the UUID format.

To integrate Store Unity SDK:

  1. Set up the Virtual Items module in your Publisher Account.
  2. Set up the asset for your Unity project.

Setting up the Virtual Items module in your Publisher Account

  1. Connect Store to your project.

  1. Connect Virtual Items.

  1. Create a group of items.

  1. Create items, specifying the following info for each of them:
    • One or more groups that the item should belong to;
    • SKU;
    • Name and short description;
    • Prices in real and virtual currencies;
    • Image (optional).

  1. Turn on the group display in Store after the items were created.

  1. Copy the Project ID.

Setting up the asset for your Unity project

  1. Go to Windows > Xsolla > Edit Settings > Inspector:
    1. Fill in the Project ID,
    2. Tick the Enable sandbox checkbox.

  1. Go to Assets > Xsolla > Demo > Login Demo > Scenes > Login and create a new user. The user’s email must match the Owner’s email in Publisher Account > Company settings > Users. Check for the confirmation email.

  1. Log in as a new user and change the password if necessary.

  1. Go to Assets > Xsolla > Demo > Login Demo > Scenes and launch the Login scene. If you launch the Store Demo first, user change is unavailable.

You can customize the integration demo settings if needed: