Interface IEnvironmentsApi
Interface to access environment information and validation.
Namespace: Unity.Services.Core.Editor.Environments
Syntax
public interface IEnvironmentsApi : INotifyPropertyChanged
Properties
ActiveEnvironmentId
The guid for the active environment.
Declaration
Guid? ActiveEnvironmentId { get; }
Property Value
Type | Description |
---|---|
Nullable<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 |
---|---|
IReadOnlyCollection<EnvironmentInfo> |
Methods
RefreshAsync()
Refreshes the list of environments.
Declaration
Task RefreshAsync()
Returns
Type | Description |
---|---|
Task | The Task for the refresh. |
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 |
---|---|---|
EnvironmentInfo | environmentInfo | The EnvironmentInfo to set as active |
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<ValidationResult> | The ValidationResult of the validation. |