Add AacFlLayer.WithWeight

This commit is contained in:
Haï~
2023-10-23 16:31:38 +02:00
parent 4b45cecb5c
commit 64f0dc47f1
@@ -375,6 +375,25 @@ namespace AnimatorAsCode.V1
return this;
}
// Change the layer weight of this layer.
public AacFlLayer WithWeight(float weight)
{
var finalFullLayerName = _fullLayerName;
_animatorController.layers = _animatorController.layers
.Select(layer =>
{
if (layer.name == finalFullLayerName)
{
layer.defaultWeight = weight;
}
return layer;
})
.ToArray();
return this;
}
}
public class AacFlBase