BaseServiceManager.GetService<T>(String, Boolean) Method

Definition

Gets the instance of the registered service.

C#
public T GetService<T> (string name = default, bool showLogs = true) where T : Microsoft.MixedReality.Toolkit.IMixedRealityService;

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.

Implements

Applies to

Product Versions
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0