MixedRealitySpatialAwarenessSystem.GetObserver 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.
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. |
Get the IMixedRealitySpatialAwarenessObserver that is registered under the specified name.
public:
virtual Microsoft::MixedReality::Toolkit::SpatialAwareness::IMixedRealitySpatialAwarenessObserver ^ GetObserver(System::String ^ name);
public Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessObserver GetObserver (string name);
abstract member GetObserver : string -> Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessObserver
override this.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.
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 |
Get the observer that is registered under the specified name matching the specified type.
public T GetObserver<T> (string name = default) where T : Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessObserver;
abstract member GetObserver : string -> 'T (requires 'T :> Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessObserver)
override this.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
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 |