편집

다음을 통해 공유


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

Definition

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)
override this.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.

Implements

Applies to