Implementation

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.

To get Economy working with your project, you need to link your project to the Unity Cloud Dashboard to access Unity services, enable your project in the Dashboard, then install the SDK in Unity Editor. For the full SDK, see Economy SDK guide.

There is a rate limit of 60 requests per player per minute to the Economy service.

You must link your project with the Unity Cloud Dashboard to use the Economy service. See Link your project in the Unity Editor in the Introduction to Unity Gaming Services documentation 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 Cloud Dashboard

You can set up and manage Economy in the Unity Cloud Dashboard:

  1. Go to cloud.unity.com.
  2. Select the Products tab from the sidebar.
  3. Under Game Economy, go to Economy and select Launch.

When you launch Economy for the first time, this adds Economy to the Shortcuts section on the sidebar and opens the Setup Guide page.

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. Install the UGS CLI.

  2. Configure your Project ID and Environment as such:
    ugs config set project-id <your-project-id>
    ugs config set environment-name <your-environment-name>

  3. 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>