docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AppBuilder

    A builder to create an App instance with required services.

    Inheritance
    object
    AppBuilder
    Implements
    IAppBuilder
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.MVVM
    Assembly: Unity.AppUI.MVVM.dll
    Syntax
    public class AppBuilder : IAppBuilder

    Properties

    services

    The available services of the application.

    Declaration
    public IServiceCollection services { get; }
    Property Value
    Type Description
    IServiceCollection
    Remarks

    The services can be registered in the builder before building the service provider. After building the service provider, the services become read-only.

    Methods

    BuildWith<THost>(THost)

    Build and initialize the app with the given host.

    Declaration
    public IApp<THost> BuildWith<THost>(THost host) where THost : class, IHost
    Parameters
    Type Name Description
    THost host

    The host to use.

    Returns
    Type Description
    IApp<THost>

    The built app instance.

    Type Parameters
    Name Description
    THost

    The type of the host to use.

    InstantiateWith<TApp, THost>()

    Instantiates a new AppBuilder with the default services according to the given App type.

    Declaration
    public static AppBuilder InstantiateWith<TApp, THost>() where TApp : class, IApp<THost> where THost : class, IHost
    Returns
    Type Description
    AppBuilder

    The instantiated AppBuilder.

    Type Parameters
    Name Description
    TApp

    The type of the app to build. It is expected that this type is a subclass of App.

    THost

    The type of the host to use.

    Implements

    IAppBuilder
    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)