Add
Adds a SkeletonNode to the RigBuilder.
Read time 2 minutesLast updated 3 hours ago
Definition
- Type: Method
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
Add(SkeletonNode)
Adds a SkeletonNode to the RigBuilder.
public void Add(in SkeletonNode node)
Parameters
The skeleton node to add.
Remarks
The index of the node is the number of nodes in the builder before the call, and it becomes the bone index in the RigDefinition. Add the root first, with a SkeletonNode.ParentIndex of . Add each other node after its parent, so that its is lower than its own index. To get the index of a parent from its identifier, use RigBuilder.GetBoneIndex.
-1ParentIndexEach bone has a translation, rotation, and scale channel with the identifier of its node, so the identifier must differ from the identifiers of the other nodes and of the translation, rotation, and scale channels.
Add(LocalTranslationChannel)
Adds a LocalTranslationChannel to the RigBuilder.
public void Add(in LocalTranslationChannel channel)
Parameters
The LocalTranslationChannel to add.
Add(LocalRotationChannel)
Adds a LocalRotationChannel to the RigBuilder.
public void Add(in LocalRotationChannel channel)
Parameters
The LocalRotationChannel to add.
Add(LocalScaleChannel)
Adds a LocalScaleChannel to the RigBuilder.
public void Add(in LocalScaleChannel channel)
Parameters
The LocalScaleChannel to add.
Add(FloatChannel)
Adds a SkeletonNode to the RigBuilder.
public void Add(in FloatChannel channel)
Parameters
Remarks
The index of the node is the number of nodes in the builder before the call, and it becomes the bone index in the RigDefinition. Add the root first, with a SkeletonNode.ParentIndex of . Add each other node after its parent, so that its is lower than its own index. To get the index of a parent from its identifier, use RigBuilder.GetBoneIndex.
-1ParentIndexEach bone has a translation, rotation, and scale channel with the identifier of its node, so the identifier must differ from the identifiers of the other nodes and of the translation, rotation, and scale channels.
Add(IntChannel)
Adds an IntChannel to the RigBuilder.
public void Add(in IntChannel channel)
Parameters
The IntChannel to add.
Add(EntityIdChannel)
Adds an EntityIdChannel to the RigBuilder.
public void Add(in EntityIdChannel channel)
Parameters
The channel to add to the rig that the builder creates.
Remarks
The channel becomes an entity ID binding of the RigDefinition that RigBuilder.ToRigDefinition creates. A clip drives the channel when it has a curve that animates an object reference and whose combined path and property hash equals EntityIdChannel.Id. Call this method on a builder that you created with RigBuilder. Otherwise, if safety checks are enabled, the method throws a .
NullReferenceExceptionAdd(SocketNode)
Adds a SocketNode to the RigBuilder.
public void Add(in SocketNode socketNode)
Parameters
The SocketNode to add.