Unity SDK

Welcome to the Unity SDK.

The easiest way to integrate any unity project with a blockchain.

As an aside; Unity has officially verified Nefta's Unity SDK.


Video guide


Text guide

1. Connecting the SDK to your Nefta Project

Download the SDK: Link here

After creating your project, go to "Details".

Here, you will have a marketplace ID:

Find the m1- code on project details page

Find the m1- code on project details page

Simply copy that ID and paste it into the SDK script.


2. Editing SDK script

First, open your project in Unity Hub.

Second, open the Demo scene:

And then open the startup script UserData where the Toolbox gets initialized:


Next, set the first parameter 'marketPlaceId' to the marketplace ID of your project, the m1-code;

And of course, hit save!

Now it matches my marketplaceID from my new project

Now it matches my marketplaceID from my new project

πŸ‘

Your project and the SDK are now linked.

As soon as someone interacts with the SDK in your game, the changes will be reflected in the Nefta platform.

Similarly, any changes made to the platform will be reflected in the game/app for the user.


3. The User Experience

Our SDK offers 3 sign-in options to onboard users:

  1. Sign up as Guest (which doesn't require any input, such as email or username);
  2. Sign up as a Full User (for guest users that want to claim their wallet with an email address);
  3. Login for existing users (who will then be sent a code to enter and confirm their log-in).

πŸ‘

All of these options are 100% frictionless, and in most cases, users don't even realise they're creating a wallet or taking part in anything Web3.


4. Guest sign-up

Users can sign up as guest. This can either happen in the background, while the player is being onboarded, for example, or by prompting them to choose a username or having one automatically generated for them.

Once players sign up as guests they are given their own wallet. These actions are then possible:

  • Get user details
    • User profile
    • Inventory/assets
    • Account balance
  • Convert into a full user
  • Interact with Marketplace
    • Buy & sell
  • Gift assets
  • Gift currency

All out-of-the-box and available after entering the Nefta marketplace ID into the Unity script.

πŸ“˜

Marketplace ID

The Marketplace ID is how the Nefta API and SDK identify and retrieve the details of a project.


5. Wallet creation

And this wallet now exists on the Nefta platform

List of players

List of players

The user is created, a wallet is assigned to them, and they can start playing and getting assets or tokens without doing anything else.

πŸ‘

You now have a scalable onboarding of wallets for users!

You could onboard hundreds of thousands of users with the Nefta platform, and they wouldn't even know they're doing anything other than playing a game.