From 047894a5d739d55da2b75672e36c2cd81705bc9a Mon Sep 17 00:00:00 2001 From: ousttrue Date: Wed, 3 Feb 2021 15:35:25 +0900 Subject: [PATCH] use SetWeight --- Assets/VRM10.Samples/Runtime/AIUEO.cs | 8 ++++---- Assets/VRM10.Samples/Runtime/Blinker.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Assets/VRM10.Samples/Runtime/AIUEO.cs b/Assets/VRM10.Samples/Runtime/AIUEO.cs index 4f81259e73..58fe8e65b1 100644 --- a/Assets/VRM10.Samples/Runtime/AIUEO.cs +++ b/Assets/VRM10.Samples/Runtime/AIUEO.cs @@ -30,17 +30,17 @@ IEnumerator RoutineNest(VrmLib.ExpressionPreset preset, float velocity, float wa { for (var value = 0.0f; value <= 1.0f; value += velocity) { - VRM.Expression.Accumulator.SetPresetValue(preset, value); + VRM.Expression.SetWeight(ExpressionKey.CreateFromPreset(preset), value); yield return null; } - VRM.Expression.Accumulator.SetPresetValue(preset, 1.0f); + VRM.Expression.SetWeight(ExpressionKey.CreateFromPreset(preset), 1.0f); yield return new WaitForSeconds(wait); for (var value = 1.0f; value >= 0; value -= velocity) { - VRM.Expression.Accumulator.SetPresetValue(preset, value); + VRM.Expression.SetWeight(ExpressionKey.CreateFromPreset(preset), value); yield return null; } - VRM.Expression.Accumulator.SetPresetValue(preset, 0); + VRM.Expression.SetWeight(ExpressionKey.CreateFromPreset(preset), 0); yield return new WaitForSeconds(wait * 2); } diff --git a/Assets/VRM10.Samples/Runtime/Blinker.cs b/Assets/VRM10.Samples/Runtime/Blinker.cs index 0ff3b7041d..815312342a 100644 --- a/Assets/VRM10.Samples/Runtime/Blinker.cs +++ b/Assets/VRM10.Samples/Runtime/Blinker.cs @@ -72,10 +72,10 @@ IEnumerator BlinkRoutine() break; } - m_controller.Expression.Accumulator.SetPresetValue(VrmLib.ExpressionPreset.Blink, value); + m_controller.Expression.SetWeight(ExpressionKey.CreateFromPreset(VrmLib.ExpressionPreset.Blink), value); yield return null; } - m_controller.Expression.Accumulator.SetPresetValue(VrmLib.ExpressionPreset.Blink, 1.0f); + m_controller.Expression.SetWeight(ExpressionKey.CreateFromPreset(VrmLib.ExpressionPreset.Blink), 1.0f); // wait... yield return new WaitForSeconds(ClosingTime); @@ -91,10 +91,10 @@ IEnumerator BlinkRoutine() break; } - m_controller.Expression.Accumulator.SetPresetValue(VrmLib.ExpressionPreset.Blink, value); + m_controller.Expression.SetWeight(ExpressionKey.CreateFromPreset(VrmLib.ExpressionPreset.Blink), value); yield return null; } - m_controller.Expression.Accumulator.SetPresetValue(VrmLib.ExpressionPreset.Blink, 0); + m_controller.Expression.SetWeight(ExpressionKey.CreateFromPreset(VrmLib.ExpressionPreset.Blink), 0); } }