SDKs for Unity / Install SDK
  Back to Docs

SDKs for Unity

Install SDK

Import package

Import package from an archive

  1. Download the SDK from CDN or GitHub.
Note
Only the latest version of the SDK is available through CDN. If you need a different version, you can download it from GitHub.

  1. Unzip the package.
  2. Open your Unity project or create a new one.
  3. In the Unity editor, go to Assets > Import Package > Custom Package in the main menu and select the SDK.

Import package from git repository

Note
For the package manager to work correctly, git client should be installed. For detailed information about the prerequisites for using the package manager, refer to the Unity documentation.

  1. Open your Unity project or create a new one.
  2. In the main menu, click Window > Package Manager.
  3. Add a package as a dependence:

    1. Click the + icon and select Add package from git URL.
    2. Specify the git repository URL: https://github.com/xsolla/store-unity-sdk.git?path=Assets/Xsolla.
    3. Click Add and wait for the import to finish.

Set up compiler

Note

We recommend you use the Mono compiler for desktop platforms as it’s compatible with the provided in-game browser. If you use other browser solutions, you can use the IL2CPP compiler instead.

You can use either Mono or IL2CPP compilers to create game builds for Android or iOS.

Make sure that the Mono compiler is used to create a game build (for standalone builds only). To do this:
  1. Click Edit > Project Settings in the main menu.
  2. Go to the Player > Other Settings > Configuration section.
  3. Make sure that Mono is selected in the Scripting Backend field.

Resolve Android dependencies

For Android builds, the SDK uses function from native Android libraries.

To resolve dependencies and download the necessary libraries:

  1. Specify Android as the build platform:
    1. In the Unity editor, go to File > Build Settings in the main menu.
    2. In the Platform panel, select Android.
    3. Click Switch Platform.

  1. Start the dependency manager:
    1. In the Unity editor, go to Assets > External Dependency Manager > Android Resolver > Resolve in the main menu.
    2. Wait for the dependency manager to finish.

As a result, the JAR or AAR files of all the necessary Android libraries are downloaded to the Assets/Plugins/Android folder.

Your progress
Thank you for your feedback!
Last updated: April 18, 2024

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!