Class OverrideRigConstraint<TConstraint, TJob, TData, TBinder>
Use this class to define an override rig constraint on another rig constraint. While the overriden constraint data remains the same, the job is overriden.
Implements
Inherited Members
Namespace: UnityEngine.Animations.Rigging
Assembly: Unity.Animation.Rigging.dll
Syntax
public class OverrideRigConstraint<TConstraint, TJob, TData, TBinder> : IRigConstraint where TConstraint : MonoBehaviour, IRigConstraint where TJob : struct, IWeightedAnimationJob where TData : struct, IAnimationJobData where TBinder : AnimationJobBinder<TJob, TData>, new()
Type Parameters
Name | Description |
---|---|
TConstraint | The base constraint to override |
TJob | The override job |
TData | The constraint data |
TBinder | The override constraint job binder |
Constructors
OverrideRigConstraint(TConstraint)
Constructor
Declaration
public OverrideRigConstraint(TConstraint baseConstraint)
Parameters
Type | Name | Description |
---|---|---|
TConstraint | baseConstraint | The constraint to override. |
Fields
m_Constraint
The base constraint.
Declaration
[SerializeField]
protected TConstraint m_Constraint
Field Value
Type | Description |
---|---|
TConstraint |
Properties
weight
The constraint weight. This is a value between 0 and 1.
Declaration
public float weight { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
CreateJob(Animator)
Creates the animation job for this constraint.
Declaration
public IAnimationJob CreateJob(Animator animator)
Parameters
Type | Name | Description |
---|---|---|
Animator | animator | The animated hierarchy Animator component. |
Returns
Type | Description |
---|---|
IAnimationJob | Returns the newly instantiated job. |
DestroyJob(IAnimationJob)
Frees the specified job memory.
Declaration
public void DestroyJob(IAnimationJob job)
Parameters
Type | Name | Description |
---|---|---|
IAnimationJob | job |
IsValid()
Retrieves the constraint valid state.
Declaration
public bool IsValid()
Returns
Type | Description |
---|---|
bool | Returns true if constraint data can be successfully evaluated. Returns false otherwise. |
UpdateJob(IAnimationJob)
Updates the specified job data.
Declaration
public void UpdateJob(IAnimationJob job)
Parameters
Type | Name | Description |
---|---|---|
IAnimationJob | job |