private void Start() { m_spatialMappingManager = SpatialMappingManager.Instance; m_spatialUnderstanding = SpatialUnderstanding.Instance; #if UNITY_EDITOR // An ObjectSurfaceObserver should be attached and will be used in Unity // editor mode to generate spatial meshes from a pre-loaded file m_spatialMappingManager.SetSpatialMappingSource(GetComponent <ObjectSurfaceObserver>()); #endif // Register for the MakePlanesComplete event SurfaceMeshesToPlanes.Instance.MakePlanesComplete += SurfaceMeshesToPlanes_MakePlanesComplete; }