diff --git a/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeExpression.cs b/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeExpression.cs index 8c0aa9ecf..da3bc541f 100644 --- a/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeExpression.cs +++ b/Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeExpression.cs @@ -91,6 +91,18 @@ namespace UniVRM10 Apply(); } + public void SetWeightsNonAlloc(Dictionary weights) + { + foreach (var (expressionKey, weight) in weights) + { + if (_inputWeights.ContainsKey(expressionKey)) + { + _inputWeights[expressionKey] = weight; + } + } + Apply(); + } + public void SetWeight(ExpressionKey expressionKey, float weight) { if (_inputWeights.ContainsKey(expressionKey))