MixedRealitySpatialAwarenessSystem.GetObserver Method

Definition

Overloads

GetObserver(String)

Get the IMixedRealitySpatialAwarenessObserver that is registered under the specified name.

GetObserver<T>(String)

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

GetObserver(String)

Get the IMixedRealitySpatialAwarenessObserver that is registered under the specified name.

C++
public:
 virtual Microsoft::MixedReality::Toolkit::SpatialAwareness::IMixedRealitySpatialAwarenessObserver ^ GetObserver(System::String ^ name);

Parameters

name
String

The friendly name of the observer.

Returns

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

Implements

Applies to

MRTK2 Unity 2018 2.7.0 та інші версії
Продукт Версії
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

GetObserver<T>(String)

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

C#
public T GetObserver<T> (string name = default) where T : Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessObserver;

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.

Implements

Applies to

MRTK2 Unity 2018 2.7.0 та інші версії
Продукт Версії
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