DemoSpatialMeshHandler Class
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.
This class is an example of the IMixedRealitySpatialAwarenessObservationHandler<T> interface. It keeps track of the IDs of each mesh and tracks the number of updates they have received.
public ref class DemoSpatialMeshHandler : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::SpatialAwareness::IMixedRealitySpatialAwarenessObservationHandler<Microsoft::MixedReality::Toolkit::SpatialAwareness::SpatialAwarenessMeshObject ^>, UnityEngine::EventSystems::IEventSystemHandler
[UnityEngine.AddComponentMenu("Scripts/MRTK/Examples/DemoSpatialMeshHandler")]
public class DemoSpatialMeshHandler : UnityEngine.MonoBehaviour, Microsoft.MixedReality.Toolkit.SpatialAwareness.IMixedRealitySpatialAwarenessObservationHandler<Microsoft.MixedReality.Toolkit.SpatialAwareness.SpatialAwarenessMeshObject>, UnityEngine.EventSystems.IEventSystemHandler
[<UnityEngine.AddComponentMenu("Scripts/MRTK/Examples/DemoSpatialMeshHandler")>]
type DemoSpatialMeshHandler = class
inherit MonoBehaviour
interface IMixedRealitySpatialAwarenessObservationHandler<SpatialAwarenessMeshObject>
interface IEventSystemHandler
Public Class DemoSpatialMeshHandler
Inherits MonoBehaviour
Implements IEventSystemHandler, IMixedRealitySpatialAwarenessObservationHandler(Of SpatialAwarenessMeshObject)
- Inheritance
-
UnityEngine.MonoBehaviourDemoSpatialMeshHandler
- Derived
- Attributes
-
UnityEngine.AddComponentMenuAttribute
- Implements
-
IMixedRealitySpatialAwarenessObservationHandler<SpatialAwarenessMeshObject> Unity
Engine. Event Systems. IEvent System Handler
is |
Value indicating whether or not this script has registered for spatial awareness events. |
Add |
Records the mesh id when it is first added. |
On |
|
On |
|
On |
|
On |
Called when a spatial observer adds a new observation. |
On |
Called when a spatial observer removes a previous observation. |
On |
Called when a spatial observer updates a previous observation. |
Register |
Registers for the spatial awareness system events. |
Remove |
Removes the mesh id. |
Start() | |
Unregister |
Unregisters from the spatial awareness system events. |
Update |
Increments the update count of the mesh with the id. |
Product | 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 |