MixedRealityServiceRegistry.AddService<T> Method
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.
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);
public static bool AddService<T> (T serviceInstance, Microsoft.MixedReality.Toolkit.IMixedRealityServiceRegistrar registrar) where T : Microsoft.MixedReality.Toolkit.IMixedRealityService;
static member AddService : 'T * Microsoft.MixedReality.Toolkit.IMixedRealityServiceRegistrar -> bool (requires 'T :> Microsoft.MixedReality.Toolkit.IMixedRealityService)
Public Shared Function AddService(Of T As IMixedRealityService) (serviceInstance As T, registrar As IMixedRealityServiceRegistrar) As Boolean
- T
The interface type of the service being added.
- serviceInstance
- T
Instance of the service to add.
- registrar
- IMixedRealityServiceRegistrar
Instance of the registrar manages the service.
True if the service was successfully added, false otherwise.
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 |