Installation

Get started

To get started with the Economy SDK:

  1. Sign in to your Unity Cloud Project using the Services window in Unity.
  2. Install the version of the package you want using the Package Manager.
  3. Initialize the Core SDK using await UnityServices.InitializeAsync().
  4. Sign in to the authentication SDK, as mentioned below.

The Economy SDK requires that an authentication flow from the Authentication SDK has been completed prior to using any of the Economy APIs, as a valid player ID and access token are required to access the Economy services. See Unity Authentication.

Using the SDK

The Economy SDK is ready to use immediately when sign in with the Authentication SDK is complete. You may then call any of the methods in this guide to start interacting with the Economy data.

Economy in the Unity Cloud Dashboard

The functionality of the SDK is only available when you have published your first Economy configuration from the Economy Configuration page in the Unity Cloud Dashboard.

To get started:

  1. From the Unity Cloud Dashboard, open Economy.
  2. Add some resources to the configuration.
  3. When you are ready for the configuration to be used in the SDK, click Publish.

Environments

Environments are logical partitions for Unity Game Services that contain data associated with your project.

You can set the target environment in the Economy Configuration page in the Unity Cloud Dashboard and in your initialization scripts. For more information, refer to Unity Environments.

IL2CPP builds

Economy does not currently support using Unity Editor's Faster (smaller) builds option when building with IL2CPP as the scripting backend. Instead, in Editor, select Build Settings > IL2CPP Code Generation > Faster runtime.