From 399b721f4a0eb99b1afd0fcde2d30d3331a9939b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=C3=AF=7E?= Date: Fri, 11 Jul 2025 01:51:45 +0200 Subject: [PATCH] Add named overload for NewBlendTree() and NewBlendTreeAsRaw(): - Add overload for NewBlendTree() which accepts a name. - Add overload for NewBlendTreeAsRaw() which accepts a name. - Addresses #56. --- .../dev.hai-vr.animator-as-code.v1/V1/Editor/Aac.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Packages/dev.hai-vr.animator-as-code.v1/V1/Editor/Aac.cs b/Packages/dev.hai-vr.animator-as-code.v1/V1/Editor/Aac.cs index c8f0b80..17e6bcd 100644 --- a/Packages/dev.hai-vr.animator-as-code.v1/V1/Editor/Aac.cs +++ b/Packages/dev.hai-vr.animator-as-code.v1/V1/Editor/Aac.cs @@ -522,6 +522,18 @@ namespace AnimatorAsCode.V1 var clip = AacInternals.NewClip(_configuration, name); return new AacFlClip(_configuration, clip); } + + /// Create a new BlendTree asset with a name. However, the name is only used as a suffix for the asset. The asset is generated into the container. + public AacFlNonInitializedBlendTree NewBlendTree(string name) + { + return new AacFlNonInitializedBlendTree(AacInternals.NewBlendTreeAsRaw(_configuration, name)); + } + + /// Create a new BlendTree asset with a name and returns a native BlendTree object. However, the name is only used as a suffix for the asset. The asset is generated into the container. You may use NewBlendTree() instead to obtain a fluent interface. + public BlendTree NewBlendTreeAsRaw(string name) + { + return AacInternals.NewBlendTreeAsRaw(_configuration, name); + } /// Create a new clip which animates a dummy transform for a specific duration specified in an unit (Frames or Seconds). public AacFlClip DummyClipLasting(float numberOf, AacFlUnit unit)