/// <summary> /// Loads the SpatialMapping mesh from the specified file. /// </summary> /// <param name="fileName">The name, without path or extension, of the file to load.</param> public void Load(string fileName) { if (string.IsNullOrEmpty(fileName)) { Debug.Log("No mesh file specified."); return; } Cleanup(); try { IList <Mesh> storedMeshes = MeshSaver.Load(fileName); for (int iMesh = 0; iMesh < storedMeshes.Count; iMesh++) { AddSurfaceObject(CreateSurfaceObject( mesh: storedMeshes[iMesh], objectName: "storedmesh-" + iMesh, parentObject: transform, meshID: iMesh )); } } catch { Debug.Log("Failed to load " + fileName); } }