IMixedRealityServiceRegistrar.GetService<T>(String, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the instance of the registered service.
public T GetService<T> (string name = default, bool showLogs = true) where T : Microsoft.MixedReality.Toolkit.IMixedRealityService;
abstract member GetService : string * bool -> 'T (requires 'T :> Microsoft.MixedReality.Toolkit.IMixedRealityService)
Public Function GetService(Of T As IMixedRealityService) (Optional name As String = Nothing, Optional showLogs As Boolean = true) As T
Type Parameters
- T
The interface type of the service (ex: IMixedRealityBoundarySystem).
Parameters
- name
- String
The name of the service.
- showLogs
- Boolean
Indicates whether or not diagnostic logging should be performed in case of an error
Returns
T
The registered service instance as the requested type.