glTFast icon indicating copy to clipboard operation
glTFast copied to clipboard

Export - Export in a single glb file

Open Pourfex opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. The runtime export of GLTFast provides a .bin and a .glb If I want to load the result later in the app or in other apps, I would need to merge them in a single .zip file or a .glb file (as many don't succeed to load the .bin - actually only mccurdy gltf viewer succeed to do it).

Describe the solution you'd like The export should result in a single .glb file without the .bin file. Or there should be an option to do so.

Describe alternatives you've considered Merge the .bin and .glb, make a zip file and load it.

Pourfex avatar Jan 25 '23 10:01 Pourfex

Hi @Pourfex ,

Depending on the ExportSettings.Format (which can be Json or Binary) it should always be either a single .glb file (containing everything) or multiple files (.gltf, .bin and separate textures).

I'd consider .glb plus a .bin files an issue indeed (are you sure you did not mean .gltf plus .bin?)

atteneder avatar Jan 30 '23 16:01 atteneder

@Pourfex Have your followed the runtime export documentation?

What does your export code look like?

atteneder avatar Jan 30 '23 16:01 atteneder

@atteneder Yeah I just followed the exemple as is. ` var exportSettings = new ExportSettings { Format = GltfFormat.Binary, FileConflictResolution = FileConflictResolution.Overwrite, };

    var export = new GameObjectExport( exportSettings);
    
    export.AddScene(rootLevelNodes, "My new glTF scene");
   
    // path is something like streaming assets / test.glb   
    var success = await export.SaveToFileAndDispose(path);

`

I was expecting a single glb file instead of glb + bin file.

Pourfex avatar Jan 31 '23 07:01 Pourfex