Class BaseHostingService | Addressables | 1.13.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class BaseHostingService

    Base class for hosting services.

    Inheritance
    Object
    BaseHostingService
    HttpHostingService
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEditor.AddressableAssets.HostingServices
    Syntax
    public abstract class BaseHostingService : IHostingService

    Properties

    DescriptiveName

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

    Declaration
    public virtual string DescriptiveName { get; set; }
    Property Value
    Type Description
    String
    Implements
    IHostingService.DescriptiveName

    HostingServiceContentRoots

    List of content roots for hosting service.

    Declaration
    public abstract List<string> HostingServiceContentRoots { get; }
    Property Value
    Type Description
    List<String>
    Implements
    IHostingService.HostingServiceContentRoots

    InstanceId

    uniquely identifies this service within the scope of the HostingServicesManager

    Declaration
    public virtual int InstanceId { get; set; }
    Property Value
    Type Description
    Int32
    Implements
    IHostingService.InstanceId

    IsHostingServiceRunning

    Gets the current running status of the hosting service.

    Declaration
    public abstract bool IsHostingServiceRunning { get; }
    Property Value
    Type Description
    Boolean
    Implements
    IHostingService.IsHostingServiceRunning

    Logger

    Get and set the logger for the hosting service.

    Declaration
    public ILogger Logger { get; set; }
    Property Value
    Type Description
    ILogger
    Implements
    IHostingService.Logger

    ProfileVariables

    Dictionary of profile variables defined by the hosting service.

    Declaration
    public abstract Dictionary<string, string> ProfileVariables { get; }
    Property Value
    Type Description
    Dictionary<String, String>
    Implements
    IHostingService.ProfileVariables

    Methods

    DisambiguateProfileVar(String)

    Decodes a profile variable lookup ID based on string key

    Declaration
    protected virtual string DisambiguateProfileVar(string key)
    Parameters
    Type Name Description
    String key

    the key to look up

    Returns
    Type Description
    String

    The variable lookup ID.

    EvaluateProfileString(String)

    Expand special variables from Addressable profiles

    Declaration
    public virtual string EvaluateProfileString(string key)
    Parameters
    Type Name Description
    String key

    Key name to match

    Returns
    Type Description
    String

    replacement string value for key, or null if no match

    Implements
    IHostingService.EvaluateProfileString(String)

    Log(String, Object[])

    Logs an info severity formatted message to the Logger specifically on this service. Logger

    Declaration
    protected void Log(string format, params object[] args)
    Parameters
    Type Name Description
    String format

    The base string

    Object[] args

    The parameters to be formatted into the base string

    LogError(String, Object[])

    Logs an error severity formatted message to the Logger specifically on this service. Logger

    Declaration
    protected void LogError(string format, params object[] args)
    Parameters
    Type Name Description
    String format

    The base string

    Object[] args

    The parameters to be formatted into the base string

    LogFormat(LogType, String, Object[])

    Logs a formatted message to the Logger specifically on this service. Logger

    Declaration
    protected void LogFormat(LogType logType, string format, object[] args)
    Parameters
    Type Name Description
    LogType logType

    Severity of the log

    String format

    The base string

    Object[] args

    The parameters to be formatted into the base string

    LogWarning(String, Object[])

    Logs an warning severity formatted message to the Logger specifically on this service. Logger

    Declaration
    protected void LogWarning(string format, params object[] args)
    Parameters
    Type Name Description
    String format

    The base string

    Object[] args

    The parameters to be formatted into the base string

    OnAfterDeserialize(KeyDataStore)

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

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

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

    Implements
    IHostingService.OnAfterDeserialize(KeyDataStore)

    OnBeforeSerialize(KeyDataStore)

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

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

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

    Implements
    IHostingService.OnBeforeSerialize(KeyDataStore)

    OnGUI()

    Render the hosting service GUI.

    Declaration
    public abstract void OnGUI()
    Implements
    IHostingService.OnGUI()

    StartHostingService()

    Starts the hosting service.

    Declaration
    public abstract void StartHostingService()
    Implements
    IHostingService.StartHostingService()

    StopHostingService()

    Stops the hosting service.

    Declaration
    public abstract void StopHostingService()
    Implements
    IHostingService.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