public static Save ( string fileName, IEnumerable |
||
fileName | string | Name to give the saved mesh file. Exclude path and extension. |
meshes | IEnumerable |
The collection of Mesh objects to save. |
return | string |
// Called every frame. private void Update() { // Keyboard commands for saving and loading a remotely generated mesh file. #if UNITY_EDITOR // S - saves the active mesh if (Input.GetKeyUp(KeyCode.S)) { MeshSaver.Save(MeshFileName, SpatialMappingManager.Instance.GetMeshes()); } // L - loads the previously saved mesh into editor and sets it to be the spatial mapping source. if (Input.GetKeyUp(KeyCode.L)) { SpatialMappingManager.Instance.SetSpatialMappingSource(this); Load(MeshFileName); } #endif }
// Called every frame. private void Update() { // There are a few keyboard commands we will add when in the editor. #if UNITY_EDITOR // F - to use the 'file' sourced mesh. if (Input.GetKeyUp(KeyCode.B)) { SpatialMappingManager.Instance.SetSpatialMappingSource(fileSurfaceObserver); } // S - saves the active mesh if (Input.GetKeyUp(KeyCode.M)) { MeshSaver.Save(fileSurfaceObserver.MeshFileName, SpatialMappingManager.Instance.GetMeshes()); } // L - loads the previously saved mesh into the file source. if (Input.GetKeyUp(KeyCode.L)) { fileSurfaceObserver.Load(fileSurfaceObserver.MeshFileName); } #endif }