From 7ceb73fbf65c857fca29bca421c78cdb872c35f9 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Wed, 24 Feb 2021 18:28:25 +0900 Subject: [PATCH] m_reverseAxis --- .../UniGLTF/ScriptedImporter/GltfScriptedImporter.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporter.cs b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporter.cs index b543a0829..76273b504 100644 --- a/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporter.cs +++ b/Assets/UniGLTF/Editor/UniGLTF/ScriptedImporter/GltfScriptedImporter.cs @@ -11,6 +11,9 @@ namespace UniGLTF [ScriptedImporter(1, "glb")] public class GltfScriptedImporter : ScriptedImporter { + [SerializeField] + Axises m_reverseAxis; + const string TextureDirName = "Textures"; const string MaterialDirName = "Materials"; @@ -25,8 +28,11 @@ namespace UniGLTF parser.ParsePath(ctx.assetPath); // Build Unity Model - var context = new ImporterContext(parser, GetExternalObjectMap() - .Select(kv => (kv.Key.name, kv.Value))); + var externalObjectMap = GetExternalObjectMap() + .Select(kv => (kv.Key.name, kv.Value)) + ; + var context = new ImporterContext(parser, externalObjectMap); + context.InvertAxis = m_reverseAxis; context.Load(); context.ShowMeshes();