/// <summary>
        /// Cleans up all memory and objects associated with the observer.
        /// </summary>
        public void CleanupObserver()
        {
            if (observer != null)
            {
                StopObserving();

                // Clear out all memory allocated the observer
                observer.Dispose();
                observer = null;

                foreach (KeyValuePair <int, GameObject> surfaceRef in surfaces)
                {
                    CleanupSurface(surfaceRef.Value);
                }

                // Get all valid mesh filters for observed surfaces and destroy them
                List <MeshFilter> meshFilters = GetMeshFilters();
                for (int i = 0; i < meshFilters.Count; i++)
                {
                    Destroy(meshFilters[i].sharedMesh);
                }
                meshFilters.Clear();

                // Cleanup all available surfaces
                foreach (GameObject availableSurface in availableSurfaces)
                {
                    Destroy(availableSurface);
                }
                availableSurfaces.Clear();
                surfaces.Clear();
            }
        }
        /// <summary>
        /// Cleans up all memory and objects associated with the observer.
        /// </summary>
        public void CleanupObserver()
        {
#if UNITY_EDITOR || UNITY_WSA
            StopObserving();

            if (observer != null)
            {
                observer.Dispose();
                observer = null;
            }

            if (outstandingMeshRequest != null)
            {
                CleanUpSurface(outstandingMeshRequest.Value);
                outstandingMeshRequest = null;
            }

            if (spareSurfaceObject != null)
            {
                CleanUpSurface(spareSurfaceObject.Value);
                spareSurfaceObject = null;
            }

            Cleanup();
#endif
        }