From 8d119179f46c0b2d33ce76cca891b832860218ec Mon Sep 17 00:00:00 2001 From: Shoma SATO Date: Sun, 19 Nov 2023 05:05:13 +0900 Subject: [PATCH] Fix custom expression key --- Assets/Hatbor/Scripts/Rig/VMC/VmcExpressionRig.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/Hatbor/Scripts/Rig/VMC/VmcExpressionRig.cs b/Assets/Hatbor/Scripts/Rig/VMC/VmcExpressionRig.cs index 60e7611..7b828b4 100644 --- a/Assets/Hatbor/Scripts/Rig/VMC/VmcExpressionRig.cs +++ b/Assets/Hatbor/Scripts/Rig/VMC/VmcExpressionRig.cs @@ -34,7 +34,8 @@ void IExpressionRig.Update(Vrm10RuntimeExpression expression) static string ConvertVrm0ToVrm1Preset(string expressionName) { - return expressionName.ToLower() switch + var expressionNameLower = expressionName.ToLower(); + return expressionNameLower switch { "joy" => "happy", "angry" => "angry", @@ -47,7 +48,7 @@ static string ConvertVrm0ToVrm1Preset(string expressionName) "o" => "oh", "blink_l" => "blinkleft", "blink_r" => "blinkright", - _ => expressionName + _ => expressionNameLower }; } }