Documentation

Economy

Economy

Implementation

Set up the Economy SDK and tools in Unity projects that already use Economy.
Read time 2 minutesLast updated 12 days ago

Warning
Attention: The Digital Services Act (DSA) requires Unity to notify our customers’ end users if Unity takes an action that impacts those end users under the DSA. To comply with this requirement, if you use Unity Gaming Services (UGS) products that rely on the Unity Authentication Service, you must integrate the notification API.
For more information on DSA, refer to the Digital Services Act - compliance update.
To make your game compliant, refer to DSA notifications.
This guide is for projects that already use Economy. Economy no longer accepts new project sign-ups. For new projects, refer to Economy service status.
To work with Economy, you must link your project to the Unity Dashboard and install the Economy SDK in the Unity Editor. For the full SDK, see Economy SDK guide.
Note
There is a rate limit of 60 requests per player per minute to the Economy service.
You must link your project with the Unity Dashboard to use the Economy service. See Link your project in the Unity Editor to learn how.

SDK installation

To install the latest Economy package for Unity:
  1. In the Unity Editor, open Window > Package Manager.
  2. In the Package Manager, select the Unity Registry list view.
  3. Search for
    com.unity.services.economy
    , or locate the Economy package in the list.
  4. Select the package, then click Install.
See the Package Manager documentation for more information.
See Economy SDK guide for the detailed SDK documentation.

Unity Dashboard

You can manage Economy in the Unity Dashboard:
  1. In the Unity Dashboard, open your project.
  2. In the Shortcuts section on the sidebar, select Economy.

Authentication

The Economy API uses JSON Web Token (JWT) authentication. The Authentication SDK supports Anonymous authentication and Platform-specific authentication.

Deploy an Economy configuration

To make your configuration accessible to the game client, you must deploy the configuration to the Economy service.
Refer to write configuration to learn more about configuration deployment.

Configure the UGS CLI

Follow the steps below to get stated with the UGS CLI:
  1. Configure your Project ID and Environment as such:
    ugs config set project-id <your-project-id>

    ugs config set environment-name <your-environment-name>
  2. Configure a Service Account with the required roles for Economy and environments management. Refer to Get Authenticated.

Deploy the resource

Run the following command:
ugs deploy <path-to-economy-file>