コード例 #1
0
        public override void StopObserving()
        {
            if (!IsRunning)
            {
                return;
            }

            meshSubsystem?.Stop();

            base.StopObserving();
        }
        /// <inheritdoc/>
        public override void Suspend()
        {
            if (!IsRunning)
            {
                Debug.LogWarning("The XR SDK spatial observer is currently stopped.");
                return;
            }

            using (SuspendPerfMarker.Auto())
            {
                if (meshSubsystem != null && meshSubsystem.running)
                {
                    meshSubsystem.Stop();
                }

                // UpdateObserver keys off of this value to stop observing.
                IsRunning = false;

                // Clear any pending work.
                meshWorkQueue.Clear();
            }
        }