docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IEnvironmentsApi

    Interface to access environment information and validation.

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

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)