Changed AssetContainer type to Object, add ContainerMode

This commit is contained in:
Haï~
2023-10-04 10:59:52 +02:00
parent a43516f45e
commit 21adaa86a6
3 changed files with 28 additions and 25 deletions
@@ -56,6 +56,15 @@ namespace AnimatorAsCode.V1
return this;
}
public AacFlClip Toggling(GameObject gameObject, bool value)
{
var binding = AacInternals.Binding(_component, typeof(GameObject), gameObject.transform, "m_IsActive");
AacInternals.SetCurve(Clip, binding, AacInternals.OneFrame(value ? 1f : 0f));
return this;
}
public AacFlClip BlendShape(SkinnedMeshRenderer renderer, string blendShapeName, float value)
{
var binding = AacInternals.Binding(_component, typeof(SkinnedMeshRenderer), renderer.transform, $"blendShape.{blendShapeName}");
@@ -157,15 +166,6 @@ namespace AnimatorAsCode.V1
return this;
}
public AacFlClip Toggling(GameObject gameObject, bool value)
{
var binding = AacInternals.Binding(_component, typeof(GameObject), gameObject.transform, "m_IsActive");
AacInternals.SetCurve(Clip, binding, AacInternals.OneFrame(value ? 1f : 0f));
return this;
}
public AacFlClip TogglingComponent(Component[] componentsWithNulls, bool value)
{
var defensiveComponents = componentsWithNulls.Where(o => o != null); // Allow users to remove an item in the middle of the array