From 2d6adb080c8a6cb88522536f04c5a131d6a51994 Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Fri, 14 May 2021 17:04:47 +0900 Subject: [PATCH] Warning when importing not implemented MToon property. --- .../IO/Material/Vrm10MToonMaterialParameterImporter.cs | 7 +++++++ .../IO/Material/Vrm10MToonMaterialTextureImporter.cs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialParameterImporter.cs b/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialParameterImporter.cs index c3880069a..dcaaf9f80 100644 --- a/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialParameterImporter.cs +++ b/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialParameterImporter.cs @@ -86,6 +86,13 @@ namespace UniVRM10 yield return (MToon.Utils.PropShadeShift, shadingShift.Value); } + var shadingShiftTextureScale = mToon?.ShadingShiftTexture?.Scale; + if (shadingShiftTextureScale.HasValue) + { + Debug.LogWarning("Need VRM 1.0 MToon implementation."); + yield return ("_NEED_IMPLEMENTATION_MTOON_1_0_shadingShiftTextureScale", shadingShiftTextureScale.Value); + } + var shadingToony = mToon?.ShadingToonyFactor; if (shadingToony.HasValue) { diff --git a/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialTextureImporter.cs b/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialTextureImporter.cs index e707f5459..5f2f33ddc 100644 --- a/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialTextureImporter.cs +++ b/Assets/VRM10/Runtime/IO/Material/Vrm10MToonMaterialTextureImporter.cs @@ -34,7 +34,7 @@ namespace UniVRM10 if (TryGetShadingShiftTexture(parser, mToon, out var shadeShiftTex)) { Debug.LogWarning("Need VRM 1.0 MToon implementation."); - yield return ("_NEED_IMPLEMENTATION_MTOON_1_0", shadeShiftTex); + yield return ("_NEED_IMPLEMENTATION_MTOON_1_0_shadingShiftTexture", shadeShiftTex); } if (TryGetMatcapTexture(parser, mToon, out var matcapTex))