// Use for initialization. private void Start() { #if !UNITY_EDITOR StartObserver(); #endif #if UNITY_EDITOR objectSurfaceObserver = GetComponent <ObjectSurfaceObserver>(); if (objectSurfaceObserver != null) { // In the Unity editor, try loading saved meshes from a model. objectSurfaceObserver.Load(objectSurfaceObserver.roomModel); if (objectSurfaceObserver.GetMeshFilters().Count > 0) { SetSpatialMappingSource(objectSurfaceObserver); } } #endif }
// Use for initialization. public void Start() { /// if not UNITY_EDITOR send a test message /// look for a mesh model /// load the mesh model /// #if !UNITY_EDITOR StartObserver(); // this will switch on the scanning /*TestObserver(); * objectSurfaceObserver = GetComponent<ObjectSurfaceObserver>(); * * if (objectSurfaceObserver != null) * { * // In the Unity editor, try loading saved meshes from a model. * objectSurfaceObserver.Load(objectSurfaceObserver.roomModel); * * if (objectSurfaceObserver.GetMeshFilters().Count > 0) * { * SetSpatialMappingSource(objectSurfaceObserver); * } * }*/ #endif #if UNITY_EDITOR objectSurfaceObserver = GetComponent <ObjectSurfaceObserver>(); if (objectSurfaceObserver != null) { // In the Unity editor, try loading saved meshes from a model. objectSurfaceObserver.Load(objectSurfaceObserver.roomModel); if (objectSurfaceObserver.GetMeshFilters().Count > 0) { SetSpatialMappingSource(objectSurfaceObserver); } } #endif }