Rutime API - ousttrue/UniGLTF GitHub Wiki
Import
var path; // gltf, glb or zip(include gltf)
var context = gltfImporter.Load(path);
context.ShowMeshes();
GameObject root = context.Root;
Export
GameObject go; // input GameObject
String path; // output file path
var gltf = new glTF();
using (var exporter = new gltfExporter(gltf))
{
exporter.Prepare(go);
exporter.Export();
}
var bytes = gltf.ToGlbBytes();
File.WriteAllBytes(path, bytes);