MixedRealityServiceRegistry.AddService<T> Method

Definition

Adds an IMixedRealityService instance to the registry.

C++
public:
generic <typename T>
 where T : Microsoft::MixedReality::Toolkit::IMixedRealityService static bool AddService(T serviceInstance, Microsoft::MixedReality::Toolkit::IMixedRealityServiceRegistrar ^ registrar);

Type Parameters

T

The interface type of the service being added.

Parameters

serviceInstance
T

Instance of the service to add.

registrar
IMixedRealityServiceRegistrar

Instance of the registrar manages the service.

Returns

True if the service was successfully added, false otherwise.

Applies to

Produit 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