Get started with UGS
The following describes how to quickly set up your project to use Unity Gaming Services.
Games using the Unity engine
- Create a project in the Unity Cloud Dashboard.
- Link your Unity Cloud project to a Unity Editor project.
- Install the UGS packages you need.
- Initialize UGS in your game code.
- Create your first Cloud Code script.
Games using REST API
If you haven’t done so already, complete the following steps before starting the onboarding process:
Create a project in the Unity Cloud Dashboard
Manage your projects and services from the Unity Cloud Dashboard. To create a new project:
- Select Projects from the primary navigation menu.
- Select New in the upper-right of the Projects page.
- Enter a project name and COPPA designation.
- Select Create.
For more information, see the documentation on managing Unity projects.
Link your project in the Unity Editor
To use Unity Gaming Services, you must link your project in the Unity Editor with its corresponding entity in the Unity Cloud Dashboard.
To link your project in the Editor:
- Select Edit > Project Settings > Services.
- Select Use an existing Unity project ID.
- Select an Organization and a project from the drop-down menus.
- Select Link project ID.
For more information, see the documentation on linking projects to the Unity Cloud Dashboard.
Install UGS packages
Install the corresponding packages for the services you want to implement in your project. To view and install packages applicable to UGS:
- In the Unity Editor, select Window > Package Manager.
- In the Package Manager, select the Unity Registry list view.
- Search for the package name, or locate it in the registry list.
- Select the package, then click Install.
You can also type services in the search bar, which returns results for all the services except Remote Config.
In Editor versions 2022.1 or higher, the Package Manager’s Services tab displays all packages available for UGS.
Initialize Unity Services in your game code
You must initialize the Services Core SDK before calling any of the services’ functionality. Unity recommends initializing services early in your game’s runtime, preferably at launch.
To initialize Unity Services in your game code, create a script that imports the Services Core namespace (
Unity.Services.Core), then call the
InitializeAsync method. For example:
public class InitializationExample : MonoBehaviour
async void Awake()
catch (Exception e)
This method initializes all Unity Gaming Services that are currently installed in your project. You can use the
State method to check the initialization status of your game at runtime. For more information, see the Services Core API documentation.
Create your first Cloud Code script and beyond
Custom server-authoritative economy logic or game logic is one of the most common uses for Unity Gaming Services. This Cloud Code walkthrough includes everything you’ll need to get started, including installation, initialization, dashboard configuration, and remotely executing a simple Cloud Code script from your game client.
Congratulations on implementing your first service. Where you go from here is up to you! Check out Unity’s Use Cases sample project for inspiration, take a look at the individual services UGS has to offer, and get started with the UGS CLI to manage, test and deploy UGS configuration.