Virtual Currency - Guide
In-game currency used for purchasing [ECON-VirtualCurrency-02]
Setting up Currencies in your application using Beamable can be done through the Content Manager. Once your currencies are created, you can choose to display your currencies with the built-in Prefab, or create a custom solution (see the Code section).
Follow these steps to get started:
Step 1. Create Currency
Here is the process to add a new object with existing content type of "Currency".
|1. Open the Content Manager Window||• Unity → Window → Beamable → Open Content Manager|
|2. Create the "Currency" content|
• Select the content type in the list
• Press the "Create" button
• Populate the content name
|3. Open the Unity Project Window||• Unity → Window → General→ Project|
|4. Select the "Currency" asset||• Search by the name given in step #3|
• View the asset in the Unity Inspector Window
|5. Populate all data fields|
Note: The icons can be set to any valid Unity’s
|6. Save the Unity Project||• Unity → File → Save Project|
Best Practice: If you are working on a team, commit to version control in this step.
|7. Publish the content||• Press the "Publish" button in the Content Manager Window|
Step 2. Grant Currency
Now that the currency content is setup, update the active player's currency via Inventory.
Here the game maker will choose either 2a or 2b.
Step 2a. Grant Currency (Portal)
|1. Locate a player's DBID||• See "Verify Success" on Step 1 - Getting Started|
|2. Open the "Toolbox" Window||• Unity → Window → Beamable → Open Beamable Toolbox|
|3. Open the "Portal" Window||• Click the "Open Portal" Button|
|4. Navigate to desired player's Inventory||• Select the active realm|
• Select the "Players" tab
• Search by the DBID from step #1
• Press the "Inventory" button
• Press the "Add Currency" button
|5. Add the Currency|
• Select the desired currency in the dropdown
• Press the "Save" button
Step 2a. Grant Currency (InventoryService)
|1. Add custom C# code||• See the Code section for more info|
This section contains any advanced configuration options and workflows.
See Content » Code (Advanced) for more info.
Updated about 1 year ago