From 8910c9baeaf924a9b74ca0fdfc8b2ab412ed26ed Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Tue, 15 Mar 2022 20:51:46 +0900 Subject: [PATCH] Ignore exception --- .../MigrationVrmFirstPersonAndLookAt.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Assets/VRM10/Runtime/Migration/MigrationVrmFirstPersonAndLookAt.cs b/Assets/VRM10/Runtime/Migration/MigrationVrmFirstPersonAndLookAt.cs index b07da8ffb..7449ce0df 100644 --- a/Assets/VRM10/Runtime/Migration/MigrationVrmFirstPersonAndLookAt.cs +++ b/Assets/VRM10/Runtime/Migration/MigrationVrmFirstPersonAndLookAt.cs @@ -1,8 +1,8 @@ -using System; using System.Collections.Generic; using UniGLTF; using UniGLTF.Extensions.VRMC_vrm; using UniJSON; +using UnityEngine; namespace UniVRM10 { @@ -19,15 +19,19 @@ namespace UniVRM10 }; } - static LookAtType MigrateLookAtType(JsonNode vrm0) + private static LookAtType MigrateLookAtType(JsonNode vrm0) { - switch (vrm0.GetString().ToLower()) + var typeString = vrm0.GetString().ToLowerInvariant(); + switch (typeString) { - case "bone": return LookAtType.bone; - case "blendshape": return LookAtType.expression; - + case "bone": + return LookAtType.bone; + case "blendshape": + return LookAtType.expression; + default: + Debug.LogWarning($"Unknown {nameof(LookAtType)}: {typeString}"); + return LookAtType.bone; } - throw new NotImplementedException(); } private static FirstPersonType MigrateFirstPersonType(JsonNode vrm0)