fix VrmScriptedImporterEditorGUI.m_vrm

This commit is contained in:
ousttrue 2021-04-22 16:18:43 +09:00
parent af50e8e2a3
commit 9dfab64d0e

View File

@ -26,13 +26,16 @@ namespace UniVRM10
m_importer = target as VrmScriptedImporter;
m_message = VrmScriptedImporterImpl.TryParseOrMigrate(m_importer.assetPath, m_importer.MigrateToVrm1, out m_parser);
if (string.IsNullOrEmpty(m_message))
if (!string.IsNullOrEmpty(m_message))
{
// ok
// error
return;
}
if (!UniGLTF.Extensions.VRMC_vrm.GltfDeserializer.TryGet(m_parser.GLTF.extensions, out m_vrm))
{
// error
m_message = "no vrm1";
m_parser = null;
return;
}
m_model = VrmLoader.CreateVrmModel(m_parser);