/// <summary>
        /// Instructs the SurfaceObserver to stop updating the SpatialMapping mesh.
        /// </summary>
        public void StopObserver()
        {
#if UNITY_EDITOR || UNITY_UWP
            // Allow observering if a device is present (Holographic Remoting)
            if (!UnityEngine.XR.XRDevice.isPresent) return;
#endif
            if (IsObserverRunning())
            {
                surfaceObserver.StopObserving();
            }
        }
        /// <summary>
        /// Instructs the SurfaceObserver to stop updating the SpatialMapping mesh.
        /// </summary>
        public void StopObserver()
        {
#if UNITY_WSA
            // Allow observing if a device is present (Holographic Remoting)
#if UNITY_2017_2_OR_NEWER
            if (!UnityEngine.XR.XRDevice.isPresent)
            {
                return;
            }
#else
            if (!UnityEngine.VR.VRDevice.isPresent)
            {
                return;
            }
#endif
#endif
            if (IsObserverRunning())
            {
                surfaceObserver.StopObserving();
            }
        }
示例#3
0
        /// <summary>
        /// Instructs the SurfaceObserver to stop updating the SpatialMapping mesh.
        /// </summary>
        public void StopObserver()
        {
#if UNITY_WSA
            // Allow observing if a device is present (Holographic Remoting)
#if UNITY_2017_2_OR_NEWER
            if (!UnityEngine.XR.XRDevice.isPresent)
            {
                return;
            }
#else
            if (!UnityEngine.VR.VRDevice.isPresent)
            {
                return;
            }
#endif
#endif
            logger.AppendMeshDebugText("Stopping observer...");
            if (IsObserverRunning())
            {
                surfaceObserver.StopObserving();
                logger.AppendMeshDebugText("Stopped observer");
            }
        }