Implementation
Set up Economy in your Unity project.
Read time 2 minutesLast updated a day ago
To get Economy working with your project, you need to link your project to the Unity 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.
Link project
You must link your project with the Unity 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:- In the Unity Editor, open Window > Package Manager.
- In the Package Manager, select the Unity Registry list view.
- Search for , or locate the Economy package in the list.
com.unity.services.economy - Select the package, then click Install.
Unity Dashboard
You can set up and manage Economy in the Unity Dashboard:- In the Unity Dashboard, select the Products tab from the sidebar.
- Under Game Economy, go to Economy and select Launch.
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:- Install the UGS CLI.
-
Configure your Project ID and Environment as such:
ugs config set project-id <your-project-id>
ugs config set environment-name <your-environment-name> - 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>