Class ServicesInitialization
Manage access and initialization to a set of services
Inheritance
Inherited Members
Namespace: Unity.Services.Core.Components
Assembly: Unity.Services.Core.Components.dll
Syntax
[AddComponentMenu("Services/Services Initialization")]
public class ServicesInitialization : ServicesBehaviour
Fields
EnvironmentName
Choose the environment name to pass in the initialization options. You can configure environments in the unity dashboard.
Declaration
[SerializeField]
[Tooltip("Choose the environment name to pass in the initialization options. You can configure environments in the unity dashboard.")]
[Visibility("UseCustomEnvironment", true)]
public string EnvironmentName
Field Value
Type | Description |
---|---|
string |
Events
Offers IUnity
Declaration
[Header("Events")]
[SerializeField]
public ServicesInitializationEvents Events
Field Value
Type | Description |
---|---|
Services |
InitializeOnStart
Option to try to initialize the services in Start().
Declaration
[Header("Automation")]
[Tooltip("This will attempt to initialize the services in Start().")]
[SerializeField]
public bool InitializeOnStart
Field Value
Type | Description |
---|---|
bool |
UseCustomEnvironment
Use this to set a custom environment in the initialization options. Defaults to the environment defined in the project settings or production.
Declaration
[SerializeField]
[Tooltip("Use this to set a custom environment in the initialization options. Defaults to the environment defined in the project settings or production.")]
[Visibility("InitializeOnStart", true)]
public bool UseCustomEnvironment
Field Value
Type | Description |
---|---|
bool |
Methods
Cleanup()
Called on destroy to cleanup
Declaration
protected override void Cleanup()
Overrides
OnServicesInitialized()
Called when the services are initialized and ready to be used
Declaration
protected override void OnServicesInitialized()
Overrides
OnServicesReady()
Called when the services registry is set and ready to be used
Declaration
protected override void OnServicesReady()