docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class UnityServices

    Utility to initialize all Unity services from a single endpoint.

    Inheritance
    object
    UnityServices
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)