Class UnityServices
Utility to initialize all Unity services from a single endpoint.
Inherited Members
Namespace: Unity.Services.Core
Assembly: Unity.Services.Core.dll
Syntax
public static class UnityServices
Properties
ExternalUserId
ExternalUserId. Use this property to pass a user ID from a 3rd party identity provider to Unity Gaming Services
Declaration
public static string ExternalUserId { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
State
Initialization state.
Declaration
public static ServicesInitializationState State { get; }
Property Value
| Type | Description |
|---|---|
| ServicesInitializationState |
Methods
InitializeAsync()
Single entry point to initialize all used services.
Declaration
public static Task InitializeAsync()
Returns
| Type | Description |
|---|---|
| Task | Return a handle to the initialization operation. |
Exceptions
| Type | Condition |
|---|---|
| ServicesInitializationException | Exception when there's an error during services initialization |
| UnityProjectNotLinkedException | Exception when the project is not linked to a cloud project id |
InitializeAsync(InitializationOptions)
Single entry point to initialize all used services.
Declaration
public static Task InitializeAsync(InitializationOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| InitializationOptions | options | The options to customize services initialization. |
Returns
| Type | Description |
|---|---|
| Task | Return a handle to the initialization operation. |
Exceptions
| Type | Condition |
|---|---|
| ServicesInitializationException | Exception when there's an error during services initialization |
| UnityProjectNotLinkedException | Exception when the project is not linked to a cloud project id |