Interface IUnityServices
Central registry for an instance of unity services.
Namespace: Unity.Services.Core
Assembly: Unity.Services.Core.dll
Syntax
public interface IUnityServicesProperties
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> InitializeFailedEvent Type
| Type | Description | 
|---|---|
| Action<Exception> | 
Initialized
Invoked when initialization completes successfully.
Declaration
event Action InitializedEvent Type
| Type | Description | 
|---|---|
| Action |