Set up Inventory UE4 SDK

To integrate the Inventory UE4 SDK:

  1. Set up Login in your Publisher Account or implement your own authorization system using the Pay Station access token.
  2. Set up the Virtual Currency module in Publisher Account (optional).
  3. Set up the Virtual Items module in your Publisher Account.
  4. Set up the plugin for your UE4 project.

Set up the Virtual Currency module in Publisher Account

Note
The SDK supports purchasing of virtual items for virtual currency. Also, the users are able to use virtual currency according to in-game logics (getting access to a location, getting progression levels, etc.). Users spend virtual currency when calling a Consume item API method.

To set up the Virtual Currency module in Publisher Account:

  1. Open your project and click Connect in the Store block. You can go to the Store settings from any section of Publisher Account by clicking the Store button in the left-hand-side menu.

  1. Click Connect in the Virtual Currency block.

  1. Create virtual currency:
    1. Click Create virtual currency.

    1. Specify the following information:
      • SKU
      • currency name
      • price of one unit of virtual currency
      • default currency
      • features of hard virtual currency (optional)
      • image (optional)
    2. Click Create currency.

  1. Create packages of virtual currency:
    1. Go to Packages.
    2. Click Create package.

    1. Specify the following information:
      • SKU
      • package name
      • short description
      • virtual currency
      • quantity of currency units in a package
      • price
      • default currency
      • image (optional)

  1. Set the Show in Store toggle to On.
  2. Click Create package.

Set up the Virtual Items module in your Publisher Account

The SDK supports the following types of items:

  • Consumable item — an item in the inventory that can be accrued or purchased repeatedly and decreases in its number once used. The item stock can be replenished. Example: grenades and bullets to attack the opponents, first aid kits, etc.
  • Nonconsumable — an item in the inventory that can be accrued or purchased only once and does not disappear from the inventory. Example: access to a location, status, etc.
  • Nonrenewing subscription — a nonconsumable item that is available for a limited period of time and disappears from the inventory when it expires. For example: premium access or season access. See the nonrenewing subscriptions recipe for more details.

To set up the Virtual Items module in your Publisher Account:

  1. Open your project and click Open in the Store block. If you haven’t connected Store yet, click Connect in the Store block.

  1. Click Connect in the Virtual Items block.

  1. Click Create a group.

  1. Specify Group code and Group name, turn on the group display in Store. Click Create group.

  1. Create items:
    1. Specify the following info for each of them:
      • one or more groups that the item should belong to
      • SKU
      • name and a short description
      • prices in real and virtual currencies
      • image (optional)

    1. In the Item property field of the Preferences section, select one of the following properties depending on the type of item:
      • consumable
      • nonconsumable
      • nonrenewing subscription

  1. Make sure that the group status is Enabled.

Set up the plugin for your UE4 project

  1. Open your UE project in Unreal Editor.
  2. For Blueprint projects only:
    1. Compile your UE project.
    2. Go to the Content Browser and add a New C++ Class with the None parent node.
  3. Go to Settings > Plugins > Installed > Xsolla Inventory SDK. Check the Enabled box and click the Restart Now button to save settings and reload the Unreal Editor.
  4. Go to Settings > Project Settings > Plugins > Xsolla Login and specify the Login ID and Project ID.

  1. Go to Settings > Project Settings > Plugins > Xsolla Inventory and specify the Project ID.

Note
For the inventory to work correctly, the same Project ID must be specified in the Xsolla Login and Xsolla Inventory sections.

  1. In the Web Store URL field specify the site address of the in-game items store (optional).

Note
You can create the site for an in-game item store using Site Builder When setting up Site Builder, use the same Login project as when setting up the Inventory UE4 SDK.

  1. Go to Content Browser > View Options and check the boxes for Show Engine Content and Show Plugin Content.

  1. Go to Content Browser > Content > Maps and launch the Demo_Inventory map of the game.

  1. Create a new user. Check for the confirmation email.

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

After the integration is complete, you can use the demo map as a template and create your own solution based on it. To do this:

  1. Follow UMG UI documentation to customize the user interface.
  2. Set up events processing.

Note
To modify the SDK for your application specifics, follow the SDK modification instruction.
Was this article helpful?
Thank you!
Is there anything we can improve? Message
We're sorry to hear that
Please explain why this article wasn't helpful to you. Message
Thank you for your feedback!
We'll review your message and use it to help us improve your experience.