StartObserving() public method

Starts the Surface Observer.
public StartObserving ( ) : void
return void
        /// <summary>
        /// Instructs the SurfaceObserver to start updating the SpatialMapping mesh.
        /// </summary>
        public void StartObserver()
        {
#if !UNITY_EDITOR
            if (!IsObserverRunning())
            {
                surfaceObserver.StartObserving();
                StartTime = Time.time;
            }
#elif UNITY_EDITOR
            fileSurfaceObserver = GetComponent <FileSurfaceObserver>();

            if (fileSurfaceObserver != null)
            {
                // In the Unity editor, try loading a saved mesh.
                fileSurfaceObserver.Load(fileSurfaceObserver.MeshFileName);

                if (fileSurfaceObserver.GetMeshFilters().Count > 0)
                {
                    SetSpatialMappingSource(fileSurfaceObserver);
                }
                else if (remoteMeshTarget != null)
                {
                    SetSpatialMappingSource(remoteMeshTarget);
                }
            }
#endif
        }
Exemplo n.º 2
0
 /// <summary>
 /// Instructs the SurfaceObserver to start updating the SpatialMapping mesh.
 /// </summary>
 public void StartObserver()
 {
     if (!IsObserverRunning())
     {
         surfaceObserver.StartObserving();
         StartTime = Time.time;
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Instructs the SurfaceObserver to start updating the SpatialMapping mesh.
        /// </summary>
        public void StartObserver()
        {
#if !UNITY_EDITOR
            if (!IsObserverRunning())
            {
                surfaceObserver.StartObserving();
                StartTime = Time.time;
            }
#endif
        }
Exemplo n.º 4
0
        /// <summary>
        /// Instructs the SurfaceObserver to start updating the SpatialMapping mesh.
        /// </summary>
        public void StartObserver()
        {
#if UNITY_EDITOR || UNITY_WSA
            Logger.Log("Starting");
            if (!IsObserverRunning())
            {
                Logger.Log("Not running");
                surfaceObserver.StartObserving();
                StartTime = Time.time;
            }
#endif
        }
Exemplo n.º 5
0
        /// <summary>
        /// Instructs the SurfaceObserver to start updating the SpatialMapping mesh.
        /// </summary>
        public void StartObserver()
        {
#if UNITY_EDITOR
            // Allow observering if a device is present (Holographic Remoting)
            if (!UnityEngine.XR.XRDevice.isPresent)
            {
                return;
            }
#endif
            if (!IsObserverRunning())
            {
                surfaceObserver.StartObserving();
                StartTime = Time.time;
            }
        }