Hi, I try with code below to read a glTF ASCII file and save in binary mode.
But when open new file I don’t see anything.
What’s wrong?
Scene _scene = new ();
string fileName = “c:\sample.zip”; //glTF ASCII
FileFormat inputFormat;
inputFormat = FileFormat.Detect (fileName);
// Display the file format
Console.WriteLine ($"{fileName} file format: " + inputFormat.ToString ());
// load scene from glTF zip
_scene.Open (fileName);
GltfSaveOptions saveGltfOpts = new (FileFormat.GLTF2_Binary)
{
SaveExtras = true,
DracoCompression = true,
};
// save in binary format
_scene.Save (“c:\sample.glb”, saveGltfOpts);