From fe25feaed6516547eedb6fe61caee41aa6505ed2 Mon Sep 17 00:00:00 2001 From: Masataka SUMI Date: Fri, 22 Oct 2021 16:39:23 +0900 Subject: [PATCH] refactor --- .../Runtime/IO/VRMUnlitTransparentZWriteMaterialImporter.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Assets/VRM/Runtime/IO/VRMUnlitTransparentZWriteMaterialImporter.cs b/Assets/VRM/Runtime/IO/VRMUnlitTransparentZWriteMaterialImporter.cs index 6afbf1c4f..691aca340 100644 --- a/Assets/VRM/Runtime/IO/VRMUnlitTransparentZWriteMaterialImporter.cs +++ b/Assets/VRM/Runtime/IO/VRMUnlitTransparentZWriteMaterialImporter.cs @@ -52,7 +52,7 @@ namespace VRM // Lit/Shade 色は黒として、Alpha のために Lit にテクスチャを設定する. // Emissive 色は白として、テクスチャを設定する. // また、元のシェーダのうちユーザが設定できるプロパティは Texture のみ. - var def = new MToonDefinition + MToon.Utils.SetMToonParametersToMaterial(unityMaterial, new MToonDefinition { Meta = new MetaDefinition { @@ -142,8 +142,7 @@ namespace VRM UvAnimationScrollYSpeedValue = 0, UvAnimationRotationSpeedValue = 0, }, - }; - MToon.Utils.SetMToonParametersToMaterial(unityMaterial, def); + }); }); Debug.LogWarning($"fallback: {UnlitTransparentZWriteShaderName} => {MToon.Utils.ShaderName}");