SDK pour Unity / Informations générales
  Retour à la documentation

SDK pour Unity

Informations générales

The player inventory contains the user’s items that they bought or received according to the game logic.

Note
When buying or receiving a bundle, items that are a part of the bundle are added to the inventory. No additional steps are required to unpack the bundle.

The inventory solution is based on the In-Game Store product. After a successful purchase, items are added to the player inventory automatically on the Xsolla side. To grant items without a purchase (for example, when reaching a certain level), use the Grant items to users API method in the back end of your application.

Users are identified via the authentication system based on the Login product. If you have configured your own authentication system, you can use a user JWT for client methods.

Instructions

Learn about advanced setups from our how-tos.

Comment utiliser le site du magasin en jeu avec les SDK

Implement the sale of virtual items and virtual currency outside the game via the store site. The purchased items and currency will be available in the player’s inventory.

To integrate your store site with the SDK:

  1. Create a store site.
  2. Specify the site address of the in-game store in the application code.
  3. Implement the logic for your application to work with the store site.

Créer un site de magasin

You can create a store site with Site Builder by following the instructions for connecting a store on the site.

Avis
By default, when creating a site, a new Login project is created in Publisher Account. When setting up Site Builder, use the same Login project as when you set up the SDK.

If you want to connect a store site that was created using a different solution, follow the instructions for creating a store.

Recommandations sur la logique de fonctionnement de l'application avec le site Web du magasin

Follow these recommendations when developing your application:

  1. Synchronize the fields of user registration and authorization in your application and in the Login widget on the store site:
    • If a user email and password are used for registration and authorization, set the username equal to the email in the application.

Note
The widget uses the user’s email and password by default for authorization and registration.
    • If you use a username, user email and password for registration and authorization, contact your Account Manager to change the Login widget fields.
  1. When navigating to the store site from the application client, implement pass-through user authorization. To do this, the user token must be passed in the URL parameters. An example of authorization is shown in the demo scene for SDK.
Cet article vous a été utile ?
Merci !
Que pouvons-nous améliorer ? Message
Nous sommes désolés de l'apprendre
Dites-nous pourquoi vous n'avez pas trouvé cet article utile. Message
Merci pour votre commentaire !
Nous examinerons votre message et l'utiliserons pour améliorer votre expérience.
Masquer

Poursuivre la lecture

Dernière mise à jour: 10 Octobre 2023

Faute de frappe ou autre erreur dans le texte ? Sélectionnez le texte concerné et appuyez sur Ctrl+Entée.

Signaler un problème
Nous améliorons continuellement notre contenu grâce à vos commentaires.
Indiquez votre adresse e-mail pour un suivi
Merci pour votre commentaire !