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 |