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 dashboard.
- Link your dashboard project to a Unity Editor project.
- 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:
Manage your projects and services from the Unity Dashboard. To create a new project:
- Select Projects from the primary navigation menu.
- Click Create project in the upper-right of the Projects page.
- Enter a project name and COPPA designation.
- Click Create project.
For more information, see the documentation on managing Unity projects.
To use Unity Gaming Services, you must link your project in the Unity Editor with its corresponding entity in the Unity 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 Dashboard.
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.
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, or take a look at the individual services UGS has to offer.