Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Rutime API

ousttrue edited this page Jul 22, 2018 · 6 revisions

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);
Clone this wiki locally