fix ExportFirstPerson

This commit is contained in:
ousttrue
2021-04-09 12:33:00 +09:00
parent 5a86d036bf
commit 37eb014228
2 changed files with 5 additions and 4 deletions

View File

@@ -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<UniGLTF.Extensions.VRMC_vrm.MeshAnnotation>(),
};
Func<Renderer, int> getIndex = r =>
{
var node = converter.Nodes[r.gameObject];

View File

@@ -1,7 +1,5 @@
using System;
using System.Linq;
using UniGLTF;
// using UniGLTF.ShaderPropExporter;
using UnityEngine;
using VRMShaders;