docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IUnityServices

    Central registry for an instance of unity services.

    Namespace: Unity.Services.Core
    Assembly: Unity.Services.Core.dll
    Syntax
    public interface IUnityServices

    Properties

    State

    The initialization state of the services instance.

    Declaration
    ServicesInitializationState State { get; }
    Property Value
    Type Description
    ServicesInitializationState

    Methods

    GetService<T>()

    Retrieve a service from the service registry

    Declaration
    T GetService<T>()
    Returns
    Type Description
    T

    The service if available, otherwise null

    Type Parameters
    Name Description
    T

    The type that was registered for the service

    InitializeAsync(InitializationOptions)

    Initialize the services

    Declaration
    Task InitializeAsync(InitializationOptions options = null)
    Parameters
    Type Name Description
    InitializationOptions options

    The options for the services

    Returns
    Type Description
    Task

    Events

    InitializeFailed

    Invoked when initialization fails.

    Declaration
    event Action<Exception> InitializeFailed
    Event Type
    Type Description
    Action<Exception>

    Initialized

    Invoked when initialization completes successfully.

    Declaration
    event Action Initialized
    Event Type
    Type Description
    Action
    In This Article
    Back to top
    Copyright © 2024 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)