From c584f2850f04b9b985828d288c6cde56ac826e64 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 6 Sep 2024 14:20:44 +0900 Subject: [PATCH] =?UTF-8?q?go.AddComponent()=20=E3=81=8C?= =?UTF-8?q?=E6=97=A2=E5=AD=98=E3=81=A7=E5=A4=B1=E6=95=97=E3=81=99=E3=82=8B?= =?UTF-8?q?=E5=AF=BE=E7=AD=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/VRM/Runtime/IO/MaterialIO/VrmMaterialExporterUtility.cs | 2 +- Assets/VRM/Runtime/SkinnedMeshUtility/VRMBoneNormalizer.cs | 2 +- Assets/VRM_Samples/RuntimeExporterSample/VRMRuntimeExporter.cs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/VRM/Runtime/IO/MaterialIO/VrmMaterialExporterUtility.cs b/Assets/VRM/Runtime/IO/MaterialIO/VrmMaterialExporterUtility.cs index 9c220c65c..396e482af 100644 --- a/Assets/VRM/Runtime/IO/MaterialIO/VrmMaterialExporterUtility.cs +++ b/Assets/VRM/Runtime/IO/MaterialIO/VrmMaterialExporterUtility.cs @@ -8,7 +8,7 @@ namespace VRM { return RenderPipelineUtility.GetRenderPipelineType() switch { - RenderPipelineTypes.UniversalRenderPipeline => throw new System.NotImplementedException(), + RenderPipelineTypes.UniversalRenderPipeline => throw new System.NotImplementedException("URP exporter not implemented"), RenderPipelineTypes.BuiltinRenderPipeline => new BuiltInVrmMaterialExporter(), _ => new BuiltInVrmMaterialExporter(), }; diff --git a/Assets/VRM/Runtime/SkinnedMeshUtility/VRMBoneNormalizer.cs b/Assets/VRM/Runtime/SkinnedMeshUtility/VRMBoneNormalizer.cs index e8e4cde50..9df426565 100644 --- a/Assets/VRM/Runtime/SkinnedMeshUtility/VRMBoneNormalizer.cs +++ b/Assets/VRM/Runtime/SkinnedMeshUtility/VRMBoneNormalizer.cs @@ -97,7 +97,7 @@ namespace VRM } } - go.AddComponent().avatar = newAvatar; + go.GetOrAddComponent().avatar = newAvatar; } /// diff --git a/Assets/VRM_Samples/RuntimeExporterSample/VRMRuntimeExporter.cs b/Assets/VRM_Samples/RuntimeExporterSample/VRMRuntimeExporter.cs index 5744a3b55..091800880 100644 --- a/Assets/VRM_Samples/RuntimeExporterSample/VRMRuntimeExporter.cs +++ b/Assets/VRM_Samples/RuntimeExporterSample/VRMRuntimeExporter.cs @@ -18,6 +18,7 @@ namespace VRM.RuntimeExporterSample { Load(); } + UseNormalize = GUILayout.Toggle(UseNormalize, "UseNormalize"); GUI.enabled = m_model != null;