Class UnityRigDefinition
Maps domain BoneIds to Unity Transform references.
Can be used as a MonoBehaviour (scene-based) or ScriptableObject (prefab-based).
Also provides bone ID list for editor dropdown population.
Inheritance
UnityRigDefinition
Assembly: Serenity.UnityProceduralExpression.Infrastructure.dll
Syntax
public class UnityRigDefinition : MonoBehaviour
Constructors
UnityRigDefinition()
Declaration
public UnityRigDefinition()
Properties
BoneCount
Gets the number of bone bindings.
Declaration
public int BoneCount { get; }
Property Value
Bones
Declaration
public IReadOnlyList<BoneBinding> Bones { get; }
Property Value
Methods
Get(BoneId)
Gets the Transform for a given domain BoneId, or null if not found.
Declaration
public Transform Get(BoneId boneId)
Parameters
| Type |
Name |
Description |
| BoneId |
boneId |
|
Returns
| Type |
Description |
| Transform |
|
Get(string)
Gets the Transform for a given BoneId string, or null if not found.
Declaration
public Transform Get(string boneId)
Parameters
| Type |
Name |
Description |
| string |
boneId |
|
Returns
| Type |
Description |
| Transform |
|
GetAllBoneIds()
Gets all valid bone IDs in this rig definition.
Declaration
public IEnumerable<string> GetAllBoneIds()
Returns
GetBoneIds()
Returns all defined bone IDs for editor dropdown population.
Does not require cache initialization (reads directly from serialized data).
Declaration
public IReadOnlyList<string> GetBoneIds()
Returns
RebuildCache()
Rebuilds the internal bone cache. Call this after modifying bones at runtime.
Declaration
public void RebuildCache()
TryGet(BoneId, out Transform)
Tries to get the Transform for a given domain BoneId.
Declaration
public bool TryGet(BoneId boneId, out Transform transform)
Parameters
| Type |
Name |
Description |
| BoneId |
boneId |
|
| Transform |
transform |
|
Returns
Tries to get the Transform for a given BoneId string.
Declaration
public bool TryGet(string boneId, out Transform transform)
Parameters
| Type |
Name |
Description |
| string |
boneId |
|
| Transform |
transform |
|
Returns
ValidateBindings()
Validates all bone bindings and returns any issues found.
Declaration
public List<string> ValidateBindings()
Returns