public void VRMSimpleSceneTest() { var go = CreateSimpelScene(); var context = new VRMImporterContext(); try { // export var gltf = VRMExporter.Export(go); using (var exporter = new gltfExporter(gltf)) { exporter.Prepare(go); exporter.Export(); // import context.ParseJson(gltf.ToJson(), new SimpleStorage()); //Debug.LogFormat("{0}", context.Json); context.Load(); AssertAreEqual(go.transform, context.Root.transform); } } finally { //Debug.LogFormat("Destory, {0}", go.name); GameObject.DestroyImmediate(go); context.Destroy(true); } }
public void VRMSimpleSceneTest() { var go = CreateSimpelScene(); var context = new VRMImporterContext(null); try { // export var gltf = VRMExporter.Export(go); using (var exporter = new gltfExporter(gltf)) { exporter.Prepare(go); exporter.Export(); // import context.Json = gltf.ToJson(); Debug.LogFormat("{0}", context.Json); gltfImporter.Import <glTF>(context, new ArraySegment <byte>()); AssertAreEqual(go.transform, context.Root.transform); } } finally { //Debug.LogFormat("Destory, {0}", go.name); GameObject.DestroyImmediate(go); context.Destroy(true); } }