docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method AddHostingService

    AddHostingService(Type, string)

    Add a new hosting service instance of the given type. The serviceType must implement the IHostingService interface, or an ArgumentException is thrown.

    Declaration
    public IHostingService AddHostingService(Type serviceType, string name)
    Parameters
    Type Name Description
    Type serviceType

    A Type object for the service. Must implement IHostingService

    string name

    A descriptive name for the new service instance.

    Returns
    Type Description
    IHostingService
    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)