Search…
🧨
Unity PC + Mobile
Get started with your unity project in minutes!
Download the SDK from the link below
https://github.com/Elixir-Games-XYZ/elixir-unity-sdk/releases
github.com

Unity - Import a package

Every request using the SDK is authenticated by game and publisher. So first, you will need to generate your credentials using the Elixir Dashboard and add them to Assets/Elixir/Resources/ElixirDescriptor.asset
If you are missing some credentials, please ask the integration team to provide them
3. Configure the local development environment
Having the SDK integrated adds within the Elixir Launcher environment a security layer that controls the execution context of the game, avoiding leaks and illegal distribution of the game.
For development purposes, we facilitate a sandbox development environment that facilitates the test and execution of the game build using the editor, so you don't need to upload the game on each iteration.
This sandbox environment simulates the Elixir Launcher context and allows developers to test the integration in a fast and easy way properly.
In order to use the sandbox environment, please make sure to set "In Build" -> "Sandbox" as in the image below:
Setting up Sandbox environment
These steps are needed both for Mobile and PC.

To make the SDK integration as simple as possible, we provide an integration example available at: Assets/Elixir/Resources/ElixirDescriptor.asset
Here you will find two different examples, one for Mobile implementation and one for PC. This example executes the following flow:

This steps validates that the game is being executed inside the Elixir Launcher Environment. If this step is completed successfully, the SDK will obtain the user session credentials, and from now on, the user will be logged into the game using his Elixir Launcher account.
If this step is not completed, the game wont be able to be executed, avoiding the game execution outside the Elixir Launcher or blocking Banned users.

This SDK also provides an elixir user authentication for the mobile platform by two ways:
  • OTP login: The user will be able to provide his email, then we will email him a verification code. Once this code is redeemed and validated, the user will be logged into the SDK.
  • QR Scan: To avoid the change of context for the user, we also provide a QR verification inside Elixir Launcher. The user will be able to scan it using his phone camera.
In the Mobile SDK OAuth, the user will remain logged with elixir until he wants to log out. This way, we avoid having a login every time the game is executed.

Once the user is authenticated, you will be able to execute this feature of the SDK, where we provide all elixir-related user information:
  • ElixirID: Unique and immutable user identification inside the Elixir Platform.
  • Username: Elixir user nickname, that can be displayed inside the game
  • Wallet: User wallet associated with the game blockchain network.
If your game already has a User entity, with account credentials, we recommend adding a "Link Account" button, that pairs up the ElixirID with your User Entity, so it's only needed to do it once. This way, each user will be able to use his native game account when launching from Elixir with just a one-time login.

After referencing the NFT collections that the game includes using the Elixir Dashboard. You will be able to use this endpoint, which will provide all the NFTs that the user owns of these collections.
From now on, the game will need to stick to a unique identifier of each NFT as the tokenId, and match internally each tokenId with the in-game Visual representation for it.
​
Export as PDF
Copy link
On this page
Quick start guide
Integration