public override void OnEnable() { base.OnEnable(); m_importer = target as GlbScriptedImporter; m_parser = new GltfParser(); m_parser.ParsePath(m_importer.assetPath); }
public override void OnEnable() { base.OnEnable(); m_importer = target as GlbScriptedImporter; m_data = new GlbFileParser(m_importer.assetPath).Parse(); var materialGenerator = new GltfMaterialDescriptorGenerator(); var materialKeys = m_data.GLTF.materials.Select((_, i) => materialGenerator.Get(m_data, i).SubAssetKey); var textureKeys = new GltfTextureDescriptorGenerator(m_data).Get().GetEnumerable().Select(x => x.SubAssetKey); m_materialEditor = new RemapEditorMaterial(materialKeys.Concat(textureKeys), GetEditorMap, SetEditorMap); m_animationEditor = new RemapEditorAnimation(AnimationImporterUtil.EnumerateSubAssetKeys(m_data.GLTF), GetEditorMap, SetEditorMap); }