docs.unity3d.com
    Show / Hide Table of Contents

    Interface IEnvironmentsApi

    Interface to access environment information and validation.

    Inherited Members
    INotifyPropertyChanged.PropertyChanged
    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023