Interface IHostingService | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Interface IHostingService

    IHostingService implementations serve Addressable content from the Unity Editor to players running locally or on devices with network access to the Editor.

    Namespace: UnityEditor.AddressableAssets
    Syntax
    public interface IHostingService

    Properties

    DescriptiveName

    Set by the HostingServicesManager, primarily used to disambiguate multiple instances of the same service in the GUI.

    Declaration
    string DescriptiveName { get; set; }
    Property Value
    Type Description
    System.String

    HostingServiceContentRoots

    Get the list of root directories being served by this hosting service

    Declaration
    List<string> HostingServiceContentRoots { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<System.String>

    InstanceId

    uniquely identifies this service within the scope of the HostingServicesManager

    Declaration
    int InstanceId { get; set; }
    Property Value
    Type Description
    System.Int32

    IsHostingServiceRunning

    Get a boolean that indicates if this hosting service is running

    Declaration
    bool IsHostingServiceRunning { get; }
    Property Value
    Type Description
    System.Boolean

    Logger

    The ILogger instance to use for debug log output

    Declaration
    ILogger Logger { get; set; }
    Property Value
    Type Description
    ILogger

    ProfileVariables

    Get a map of all profile variables and their current values

    Declaration
    Dictionary<string, string> ProfileVariables { get; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.String>

    Methods

    EvaluateProfileString(String)

    Expand special variables from Addressable profiles

    Declaration
    string EvaluateProfileString(string key)
    Parameters
    Type Name Description
    System.String key

    Key name to match

    Returns
    Type Description
    System.String

    replacement string value for key, or null if no match

    OnAfterDeserialize(KeyDataStore)

    Called immediatley following a domain reload by the HostingServicesManager, for restoring state information after the service is recreated.

    Declaration
    void OnAfterDeserialize(KeyDataStore dataStore)
    Parameters
    Type Name Description
    KeyDataStore dataStore

    A key/value pair data store for use in restoring state information

    OnBeforeSerialize(KeyDataStore)

    Called by the HostingServicesManager before a domain reload, giving the hosting service an opportunity to persist state information.

    Declaration
    void OnBeforeSerialize(KeyDataStore dataStore)
    Parameters
    Type Name Description
    KeyDataStore dataStore

    A key/value pair data store for use in persisting state information

    OnGUI()

    Draw configuration GUI elements

    Declaration
    void OnGUI()

    StartHostingService()

    Start the hosting service

    Declaration
    void StartHostingService()

    StopHostingService()

    Stop the hosting service

    Declaration
    void StopHostingService()
    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