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.HostingServices
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 |
---|---|
String |
HostingServiceContentRoots
Get the list of root directories being served by this hosting service
Declaration
List<string> HostingServiceContentRoots { get; }
Property Value
Type | Description |
---|---|
List<String> |
InstanceId
uniquely identifies this service within the scope of the HostingServicesManager
Declaration
int InstanceId { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
IsHostingServiceRunning
Get a boolean that indicates if this hosting service is running
Declaration
bool IsHostingServiceRunning { get; }
Property Value
Type | Description |
---|---|
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 |
---|---|
Dictionary<String, String> |
Methods
EvaluateProfileString(String)
Expand special variables from Addressable profiles
Declaration
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 |
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()