From 1abdb0690d479ae6110b402e94d0aad16ccde631 Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Tue, 15 Mar 2022 21:48:12 +0900 Subject: [PATCH] rename --- .../Migration/MigrationVrmFirstPersonAndLookAt.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/VRM10/Runtime/Migration/MigrationVrmFirstPersonAndLookAt.cs b/Assets/VRM10/Runtime/Migration/MigrationVrmFirstPersonAndLookAt.cs index 4989760bc..9ca9460c9 100644 --- a/Assets/VRM10/Runtime/Migration/MigrationVrmFirstPersonAndLookAt.cs +++ b/Assets/VRM10/Runtime/Migration/MigrationVrmFirstPersonAndLookAt.cs @@ -45,9 +45,9 @@ namespace UniVRM10 return LookAtType.bone; } - private static FirstPersonType MigrateFirstPersonType(JsonNode firstPersonJsonNode, string key) + private static FirstPersonType MigrateFirstPersonType(JsonNode meshAnnotationJsonNode, string key) { - if (firstPersonJsonNode.TryGet(key, out var firstPersonTypeStringJsonNode)) + if (meshAnnotationJsonNode.TryGet(key, out var firstPersonTypeStringJsonNode)) { switch (firstPersonTypeStringJsonNode.GetString().ToLowerInvariant()) { @@ -109,17 +109,17 @@ namespace UniVRM10 // NOTE: VRM 1.0 では firstPersonBoneOffset は FirstPerson 拡張ではなく LookAt 拡張の OffsetFromHeadBone に移行します. MeshAnnotations = new List(), }; - if (firstPersonJsonNode.TryGet("meshAnnotations", out var meshAnnotationArrayNode)) + if (firstPersonJsonNode.TryGet("meshAnnotations", out var meshAnnotationArrayJsonNode)) { - foreach (var x in meshAnnotationArrayNode.ArrayItems()) + foreach (var meshAnnotationJsonNode in meshAnnotationArrayJsonNode.ArrayItems()) { - var renderNodeIndex = MigrateFirstPersonMeshIndex(x, "mesh", gltf); + var renderNodeIndex = MigrateFirstPersonMeshIndex(meshAnnotationJsonNode, "mesh", gltf); if (renderNodeIndex.HasValue) { firstPerson.MeshAnnotations.Add(new MeshAnnotation { Node = renderNodeIndex.Value, - Type = MigrateFirstPersonType(x, "firstPersonFlag"), + Type = MigrateFirstPersonType(meshAnnotationJsonNode, "firstPersonFlag"), }); } }