Unity
Unity integration
Introduction
Virtual items are game items, that can be purchased using game currency or can be rewarded as completing an Achievements. The Virtual item can also be minted an turn into NFT through the PLAY Dev Dashboard.
For example, a virtual item can be:
Racing Game: It can be different types of cars.
Puzzle game: It can be a bunch of hints pack.
Match-3 game: There can be different types of power-ups.
Shooting Game: Different types of guns, ammo etc
Virtual Items can be created using the PLAY Dev Dashboard.
Virtual item class methods
IsNFT();
Return a bool to let you know if the virtual item is an NFT or not.
GetRGNCoinPrice();
Return the price in rgn-coin if the item is an NFT.
GetCustomCoinPrice(string currencyName);
Return the price based on your custom currency setup in the virtual item.
Get All Virtual Items for current app
Get with pagination
There is also a method overload for pagination requests. The pagination means you request not all items at once for the project. In this example every request contains 5 items. Each time you call the method, 5 more items will be loaded and added to the loaded item list.
Different ways to retrieve virtual items :
Get by tags
Get by ids
Updating Virtual Items data
Storing and getting custom json data :
It is possible the store and retrieve custom properties json string associated with virtual item. The json string should be UTF8 formatted string not longer than 100k characters.
Updating and downloading the virtual item image :
To download virtual item image you can use following code:
Buy virtual items
To buy virtual items, please refer to the Store Module.
Last updated
Was this helpful?