Class BoneRenderer
The BoneRenderer component is responsible for displaying pickable bones in the Scene View. This component does nothing during runtime.
Inherited Members
Namespace: UnityEngine.Animations.Rigging
Assembly: Unity.Animation.Rigging.dll
Syntax
[ExecuteInEditMode]
[AddComponentMenu("Animation Rigging/Setup/Bone Renderer")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.animation.rigging@1.1/manual/RiggingWorkflow.html#bone-renderer-component")]
public class BoneRenderer : MonoBehaviour
Fields
boneColor
Color of the bones.
Declaration
public Color boneColor
Field Value
| Type | Description |
|---|---|
| Color |
boneShape
Shape of the bones.
Declaration
public BoneRenderer.BoneShape boneShape
Field Value
| Type | Description |
|---|---|
| BoneRenderer.BoneShape |
boneSize
Size of the bones.
Declaration
[Range(0.01, 5)]
public float boneSize
Field Value
| Type | Description |
|---|---|
| float |
drawBones
Toggles whether to render bone shapes or not.
Declaration
public bool drawBones
Field Value
| Type | Description |
|---|---|
| bool |
drawTripods
Toggles whether to draw tripods on bones or not.
Declaration
public bool drawTripods
Field Value
| Type | Description |
|---|---|
| bool |
onAddBoneRenderer
Notification callback that is sent whenever a BoneRenderer calls OnEnable.
Declaration
public static BoneRenderer.OnAddBoneRendererCallback onAddBoneRenderer
Field Value
| Type | Description |
|---|---|
| BoneRenderer.OnAddBoneRendererCallback |
onRemoveBoneRenderer
Notification callback that is sent whenever a BoneRenderer calls OnDisable.
Declaration
public static BoneRenderer.OnRemoveBoneRendererCallback onRemoveBoneRenderer
Field Value
| Type | Description |
|---|---|
| BoneRenderer.OnRemoveBoneRendererCallback |
tripodSize
Size of the tripod axis.
Declaration
[Range(0.01, 5)]
public float tripodSize
Field Value
| Type | Description |
|---|---|
| float |
Properties
bones
Retrieves the bones isolated from the Transform references.
Declaration
public BoneRenderer.TransformPair[] bones { get; }
Property Value
| Type | Description |
|---|---|
| TransformPair[] |
See Also
tips
Retrieves the tip bones isolated from the Transform references.
Declaration
public Transform[] tips { get; }
Property Value
| Type | Description |
|---|---|
| Transform[] |
See Also
transforms
Transform references in the BoneRenderer hierarchy that are used to build bones.
Declaration
public Transform[] transforms { get; set; }
Property Value
| Type | Description |
|---|---|
| Transform[] |
Methods
ClearBones()
Clears bones and tip bones.
Declaration
public void ClearBones()
ExtractBones()
Builds bones and tip bones from Transform references.
Declaration
public void ExtractBones()
Invalidate()
Invalidate and Rebuild bones and tip bones from Transform references.
Declaration
public void Invalidate()
Reset()
Resets the BoneRenderer to default values.
Declaration
public void Reset()