From 37eb014228ef758350bfb062ced06a3fb468afaa Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 9 Apr 2021 12:33:00 +0900 Subject: [PATCH] fix ExportFirstPerson --- Assets/VRM10/Runtime/IO/Vrm10Exporter.cs | 7 +++++-- Assets/VRM10/Runtime/IO/Vrm10MaterialExporter.cs | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs b/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs index a865a552a..3aca47c24 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs @@ -239,12 +239,15 @@ namespace UniVRM10 void ExportFirstPerson(UniGLTF.Extensions.VRMC_vrm.VRMC_vrm vrm, VRM10Controller vrmController, Model model, RuntimeVrmConverter converter) { - if (vrmController?.FirstPerson != null) + if (vrmController?.FirstPerson == null) { return; } - vrm.FirstPerson = new UniGLTF.Extensions.VRMC_vrm.FirstPerson(); + vrm.FirstPerson = new UniGLTF.Extensions.VRMC_vrm.FirstPerson + { + MeshAnnotations = new List(), + }; Func getIndex = r => { var node = converter.Nodes[r.gameObject]; diff --git a/Assets/VRM10/Runtime/IO/Vrm10MaterialExporter.cs b/Assets/VRM10/Runtime/IO/Vrm10MaterialExporter.cs index 67d688e4c..d74da3003 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10MaterialExporter.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10MaterialExporter.cs @@ -1,7 +1,5 @@ using System; -using System.Linq; using UniGLTF; -// using UniGLTF.ShaderPropExporter; using UnityEngine; using VRMShaders;