Virtual Currency - Prefab

UI for virtual currency [ECON-VirtualCurrency-Prefab]

Overview

This guide includes everything needed to use the Currency HUD Feature Prefab in the "Beamable SDK for Unity". Or watch this video.

This feature is flexible to meet the currency needs of each game's design. Currencies are used to buy items (e.g. Gold). Currencies are also used to symbolize the player's progress through the game; e.g. experience points (XP).

The purpose of this feature is to allow the player to see UI for their virtual currency.

📘

Related Guides

A common use case for the feature is covered in the guides.

Why Use In-Game Currency?

What Can Players Use Currency For?

The usage of currencies depends on the game's design. Some currencies are used to mark or symbolize the player's progress through the game. The player 'feels' they have achieved more progress when they see the currency increase. Experience points (XP) is a good example of this.

A game also may allow the player to unlock content by spending currency.

Types of Currency

It is common to think about in-game currency in two major types; Hard Currency and Soft Currency.

Many teams design a multiple currency model for their in-game economies.

NameDetail
Hard CurrencyRewarded to the player through IAP trasactions

Example: Gems
Soft CurrencyRewarded to the player through gameplay progression

Example: Experience Points (XP)

The User Interface

When set up properly, the player's user interface in the game project will be as follows:

517

The Beamable "Currency HUD" UI in the Unity Game Window

Steps

Follow these steps to get started:

StepDetail
1. Open the "Toolbox" Window• Unity → Window → Beamable → Open Beamable Toolbox
2. Add the "Currency HUD" Prefab• Drag this Prefab from the Beamable Toolbox Window to the Unity Hierarchy Window

Here is the "Beamable" menu as seen in Unity:

602

The “Beamable” Menu

Here is the feature Prefab as seen in the Beamable Toolbox.

701

The Beamable "Currency HUD" in the Beamable Toolbox Window

Defaults

Some Beamable features include some setup and configuration by default.

Gems

Beamable includes Gems in the game project by default. Press the "-" button in the Content Manager to delete the Gems if Gems are not desired.

Advanced

This section contains any advanced configuration options and workflows.

Adding A New Custom Currency

Currency is optional in each game project. Beamable supports multiple currencies. See Content - Custom Content for more info on adding a new custom currency.

Addressables Support For Currency

The currency system supports Unity's Addressables. See Content - Custom Content for more info on adding a new custom currency.

Gifting Currency By PlayerId

The Portal allows the game maker to gift currency to a player.

  1. Open the Portal
  2. Search for player by PlayerId or email
  3. Increment the amount, for existing currency type
  4. or add the currency, for a new currency type

Rewarding Currency To Player

There are several ways to reward currency to the player;