Editar

Compartilhar via


IMixedRealitySpatialAwarenessSystem.GetObserver Method

Definition

Overloads

GetObserver(String)
Obsolete.

Get the IMixedRealitySpatialAwarenessObserver that is registered under the specified name.

GetObserver<T>(String)
Obsolete.

Get the observer that is registered under the specified name matching the specified type.

GetObserver(String)

Caution

GetObserver will be removed in a future release. Cast to IMixedRealityDataProviderAccess and call GetDataProvider instead

Get the IMixedRealitySpatialAwarenessObserver that is registered under the specified name.

public:
 Microsoft::MixedReality::Toolkit::SpatialAwareness::IMixedRealitySpatialAwarenessObserver ^ GetObserver(System::String ^ name);
[System.Obsolete("GetObserver will be removed in a future release. Cast to IMixedRealityDataProviderAccess and call GetDataProvider instead")]
public Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessObserver GetObserver (string name);
[<System.Obsolete("GetObserver will be removed in a future release. Cast to IMixedRealityDataProviderAccess and call GetDataProvider instead")>]
abstract member GetObserver : string -> Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessObserver
Public Function GetObserver (name As String) As IMixedRealitySpatialAwarenessObserver

Parameters

name
String

The friendly name of the observer.

Returns

The requested observer, or null if one cannot be found.

Attributes

Remarks

If more than one observer is registered under the specified name, the first will be returned.

Applies to

GetObserver<T>(String)

Caution

GetObserver<T> will be removed in a future release. Cast to IMixedRealityDataProviderAccess and call GetDataProvider<T> instead

Get the observer that is registered under the specified name matching the specified type.

[System.Obsolete("GetObserver<T> will be removed in a future release. Cast to IMixedRealityDataProviderAccess and call GetDataProvider<T> instead")]
public T GetObserver<T> (string name = default) where T : Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessObserver;
[<System.Obsolete("GetObserver<T> will be removed in a future release. Cast to IMixedRealityDataProviderAccess and call GetDataProvider<T> instead")>]
abstract member GetObserver : string -> 'T (requires 'T :> Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessObserver)
Public Function GetObserver(Of T As IMixedRealitySpatialAwarenessObserver) (Optional name As String = Nothing) As T

Type Parameters

T

The desired spatial awareness observer type (ex: IMixedRealitySpatialAwarenessMeshObserver)

Parameters

name
String

The friendly name of the observer.

Returns

T

The requested observer, or null if one cannot be found.

Attributes

Remarks

If more than one observer is registered under the specified name, the first will be returned.

Applies to