Exemplo n.º 1
0
    static public void SaveMeshFile(string FilePath, Mesh mesh, Matrix4x4 Transform)
    {
        var Json       = PopThreeJsBufferGeometry.GetMeshJsonString(mesh, Transform);
        var FileHandle = File.CreateText(FilePath);

        FileHandle.Write(Json);
        FileHandle.Close();
        //PopBrowseToFile.ShowFile( FilePath );
    }
    static public void SaveMeshFile(Mesh mesh, Matrix4x4 Transform)
    {
        string path = UnityEditor.EditorUtility.SaveFilePanel("Save mesh json", "", mesh.name + ".json", "json");

        if (path.Length != 0)
        {
            var Json       = PopThreeJsBufferGeometry.GetMeshJsonString(mesh, Transform);
            var FileHandle = File.CreateText(path);
            FileHandle.Write(Json);
            FileHandle.Close();
            PopBrowseToFile.ShowFile(path);
        }
    }
Exemplo n.º 3
0
 public void SaveMeshFile()
 {
     PopThreeJsBufferGeometry.SaveMeshFile(MeshSource.mesh, Matrix4x4.identity);
 }