Interface IEnvironmentsApi
Interface to access environment information and validation.
Inherited Members
Namespace: Unity.Services.Core.Editor.Environments
Assembly: Unity.Services.Core.Environments.Editor.dll
Syntax
public interface IEnvironmentsApi : INotifyPropertyChanged
Properties
ActiveEnvironmentId
The guid for the active environment.
Declaration
Guid? ActiveEnvironmentId { get; }
Property Value
Type | Description |
---|---|
Guid? |
ActiveEnvironmentName
The name for the active environment.
Declaration
string ActiveEnvironmentName { get; }
Property Value
Type | Description |
---|---|
string |
Environments
The environments currently available.
Declaration
IReadOnlyCollection<EnvironmentInfo> Environments { get; }
Property Value
Type | Description |
---|---|
IRead |
Methods
RefreshAsync()
Refreshes the list of environments.
Declaration
Task RefreshAsync()
Returns
SetActiveEnvironment(Guid)
Set the active environment.
Declaration
void SetActiveEnvironment(Guid environmentGuid)
Parameters
Type | Name | Description |
---|---|---|
Guid | environmentGuid | The guid of the environment to set as active |
SetActiveEnvironment(string)
Set the active environment.
Declaration
void SetActiveEnvironment(string environmentName)
Parameters
Type | Name | Description |
---|---|---|
string | environmentName | The name of the environment to set as active |
SetActiveEnvironment(EnvironmentInfo)
Set the active environment.
Declaration
void SetActiveEnvironment(EnvironmentInfo environmentInfo)
Parameters
Type | Name | Description |
---|---|---|
Environment |
environmentInfo | The Environment |
ValidateEnvironmentAsync()
Validates that the user is logged in, their project is linked, the environment has been selected, and the environment is valid for the project.
Declaration
Task<ValidationResult> ValidateEnvironmentAsync()
Returns
Type | Description |
---|---|
Task<Validation |
The Validation |